From 28d0e087854558f5c133a9efc030efa8c9e9bf4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Ot=C3=A1vio=20Cobucci=20Oblonczyk?= Date: Mon, 19 Aug 2013 04:39:13 -0300 Subject: [PATCH] Package options should be dumped if exists --- src/Composer/Package/Dumper/ArrayDumper.php | 4 ++++ tests/Composer/Test/Package/Dumper/ArrayDumperTest.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Composer/Package/Dumper/ArrayDumper.php b/src/Composer/Package/Dumper/ArrayDumper.php index bca932d71..0fea4578d 100644 --- a/src/Composer/Package/Dumper/ArrayDumper.php +++ b/src/Composer/Package/Dumper/ArrayDumper.php @@ -108,6 +108,10 @@ class ArrayDumper } } + if (count($package->getOptions()) > 0) { + $data['options'] = $package->getOptions(); + } + return $data; } diff --git a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php index 4b9877523..54e8de9cc 100644 --- a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php +++ b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php @@ -194,6 +194,10 @@ class ArrayDumperTest extends \PHPUnit_Framework_TestCase array(new Link('foo', 'foo/bar', new VersionConstraint('=', '1.0.0.0'), 'requires', '1.0.0'), new Link('bar', 'bar/baz', new VersionConstraint('=', '1.0.0.0'), 'requires', '1.0.0')), 'conflicts', array('bar/baz' => '1.0.0', 'foo/bar' => '1.0.0') + ), + array( + 'options', + array('ssl' => array('local_cert' => '/opt/certs/test.pem')) ) ); }