From edddae42db396041c36fab26bb9d74e99150690f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 26 Aug 2016 11:32:58 +0200 Subject: [PATCH] Revert default change from #5603 --- src/Composer/Installer.php | 2 +- src/Composer/Package/Loader/ArrayLoader.php | 2 +- tests/Composer/Test/Package/Loader/ArrayLoaderTest.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index f0c74a728..bf221a125 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -625,7 +625,7 @@ class Installer // but as it is not persisted on disk we use a loader/dumper // to reload it in memory $localRepo = new InstalledArrayRepository(array()); - $loader = new ArrayLoader(); + $loader = new ArrayLoader(null, true); $dumper = new ArrayDumper(); foreach ($tempLocalRepo->getCanonicalPackages() as $pkg) { $localRepo->addPackage($loader->load($dumper->dump($pkg))); diff --git a/src/Composer/Package/Loader/ArrayLoader.php b/src/Composer/Package/Loader/ArrayLoader.php index e86df0a45..10ad4376a 100644 --- a/src/Composer/Package/Loader/ArrayLoader.php +++ b/src/Composer/Package/Loader/ArrayLoader.php @@ -29,7 +29,7 @@ class ArrayLoader implements LoaderInterface protected $versionParser; protected $loadOptions; - public function __construct(SemverVersionParser $parser = null, $loadOptions = true) + public function __construct(SemverVersionParser $parser = null, $loadOptions = false) { if (!$parser) { $parser = new VersionParser; diff --git a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php index 25bf7b28c..a2ce20d12 100644 --- a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php +++ b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php @@ -150,6 +150,7 @@ class ArrayLoaderTest extends \PHPUnit_Framework_TestCase $package = $this->loader->load($config); $dumper = new ArrayDumper; $expectedConfig = $config; + $expectedConfig = $this->fixConfigWhenLoadConfigIsFalse($config); $this->assertEquals($expectedConfig, $dumper->dump($package)); }