@@ -193,6 +193,10 @@ class ArrayLoader implements LoaderInterface
}
+ if (isset($config['options'])) {
+ $package->setOptions($config['options']);
+ }
+
return $package;
@@ -196,6 +196,7 @@ class ValidatingArrayLoader implements LoaderInterface
// TODO validate package repositories' packages using this recursively
$this->validateFlatArray('include-path');
+ $this->validateArray('options');
// branch alias validation
if (isset($this->config['extra']['branch-alias'])) {
@@ -117,6 +117,7 @@ class ArrayLoaderTest extends \PHPUnit_Framework_TestCase
'archive' => array(
'exclude' => array('/foo/bar', 'baz', '!/foo/bar/baz'),
),
+ 'options' => array('ssl' => array('local_cert' => '/opt/certs/test.pem'))
);
$package = $this->loader->load($config);
@@ -143,6 +143,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'bin/foo',
'bin/bar',
array( // test as array
@@ -256,6 +257,15 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'autoload : invalid value (psr0), must be one of psr-0, classmap, files'
)
+ array(
+ 'name' => 'foo/bar',
+ 'options' => 'test',
+ ),
+ 'options : should be an array, string given'
+ )