diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 8423fd2ad..4f472a2ef 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -18,6 +18,7 @@ use Composer\Installer\InstallationManager; use Composer\IO\IOInterface; use Composer\Package\AliasPackage; use Composer\Package\PackageInterface; +use Composer\Package\RootPackageInterface; use Composer\Repository\InstalledRepositoryInterface; use Composer\Repository\PlatformRepository; use Composer\Semver\Constraint\Bound; @@ -136,7 +137,7 @@ class AutoloadGenerator } } - public function dump(Config $config, InstalledRepositoryInterface $localRepo, PackageInterface $mainPackage, InstallationManager $installationManager, $targetDir, $scanPsrPackages = false, $suffix = '') + public function dump(Config $config, InstalledRepositoryInterface $localRepo, RootPackageInterface $rootPackage, InstallationManager $installationManager, $targetDir, $scanPsrPackages = false, $suffix = '') { if ($this->classMapAuthoritative) { // Force scanPsrPackages when classmap is authoritative @@ -193,8 +194,8 @@ EOF; // Collect information from all packages. $devPackageNames = $localRepo->getDevPackageNames(); - $packageMap = $this->buildPackageMap($installationManager, $mainPackage, $localRepo->getCanonicalPackages()); - $autoloads = $this->parseAutoloads($packageMap, $mainPackage, $this->devMode === false); + $packageMap = $this->buildPackageMap($installationManager, $rootPackage, $localRepo->getCanonicalPackages()); + $autoloads = $this->parseAutoloads($packageMap, $rootPackage, $this->devMode === false); // Process the 'psr-0' base directories. foreach ($autoloads['psr-0'] as $namespace => $paths) { @@ -234,9 +235,9 @@ EOF; // add custom psr-0 autoloading if the root package has a target dir $targetDirLoader = null; - $mainAutoload = $mainPackage->getAutoload(); - if ($mainPackage->getTargetDir() && !empty($mainAutoload['psr-0'])) { - $levels = substr_count($filesystem->normalizePath($mainPackage->getTargetDir()), '/') + 1; + $mainAutoload = $rootPackage->getAutoload(); + if ($rootPackage->getTargetDir() && !empty($mainAutoload['psr-0'])) { + $levels = substr_count($filesystem->normalizePath($rootPackage->getTargetDir()), '/') + 1; $prefixes = implode(', ', array_map(function ($prefix) { return var_export($prefix, true); }, array_keys($mainAutoload['psr-0']))); @@ -395,10 +396,13 @@ EOF; return ClassMapGenerator::createMap($dir, $excluded, $showAmbiguousWarning ? $this->io : null, $namespaceFilter, $autoloadType, $scannedFiles); } - public function buildPackageMap(InstallationManager $installationManager, PackageInterface $mainPackage, array $packages) + /** + * @param RootPackageInterface $rootPackage + */ + public function buildPackageMap(InstallationManager $installationManager, PackageInterface $rootPackage, array $packages) { // build package => install path map - $packageMap = array(array($mainPackage, '')); + $packageMap = array(array($rootPackage, '')); foreach ($packages as $package) { if ($package instanceof AliasPackage) { @@ -440,26 +444,26 @@ EOF; /** * Compiles an ordered list of namespace => path mappings * - * @param array $packageMap array of array(package, installDir-relative-to-composer.json) - * @param PackageInterface $mainPackage root package instance - * @param bool $filterOutRequireDevPackages whether to filter out require-dev packages - * @return array array('psr-0' => array('Ns\\Foo' => array('installDir'))) + * @param array $packageMap array of array(package, installDir-relative-to-composer.json) + * @param RootPackageInterface $rootPackage root package instance + * @param bool $filterOutRequireDevPackages whether to filter out require-dev packages + * @return array array('psr-0' => array('Ns\\Foo' => array('installDir'))) */ - public function parseAutoloads(array $packageMap, PackageInterface $mainPackage, $filterOutRequireDevPackages = false) + public function parseAutoloads(array $packageMap, PackageInterface $rootPackage, $filterOutRequireDevPackages = false) { - $mainPackageMap = array_shift($packageMap); + $rootPackageMap = array_shift($packageMap); if ($filterOutRequireDevPackages) { - $packageMap = $this->filterPackageMap($packageMap, $mainPackage); + $packageMap = $this->filterPackageMap($packageMap, $rootPackage); } $sortedPackageMap = $this->sortPackageMap($packageMap); - $sortedPackageMap[] = $mainPackageMap; - array_unshift($packageMap, $mainPackageMap); + $sortedPackageMap[] = $rootPackageMap; + array_unshift($packageMap, $rootPackageMap); - $psr0 = $this->parseAutoloadsType($packageMap, 'psr-0', $mainPackage); - $psr4 = $this->parseAutoloadsType($packageMap, 'psr-4', $mainPackage); - $classmap = $this->parseAutoloadsType(array_reverse($sortedPackageMap), 'classmap', $mainPackage); - $files = $this->parseAutoloadsType($sortedPackageMap, 'files', $mainPackage); - $exclude = $this->parseAutoloadsType($sortedPackageMap, 'exclude-from-classmap', $mainPackage); + $psr0 = $this->parseAutoloadsType($packageMap, 'psr-0', $rootPackage); + $psr4 = $this->parseAutoloadsType($packageMap, 'psr-4', $rootPackage); + $classmap = $this->parseAutoloadsType(array_reverse($sortedPackageMap), 'classmap', $rootPackage); + $files = $this->parseAutoloadsType($sortedPackageMap, 'files', $rootPackage); + $exclude = $this->parseAutoloadsType($sortedPackageMap, 'exclude-from-classmap', $rootPackage); krsort($psr0); krsort($psr4); @@ -1051,7 +1055,7 @@ $initializer INITIALIZER; } - protected function parseAutoloadsType(array $packageMap, $type, PackageInterface $mainPackage) + protected function parseAutoloadsType(array $packageMap, $type, RootPackageInterface $rootPackage) { $autoloads = array(); @@ -1059,7 +1063,7 @@ INITIALIZER; list($package, $installPath) = $item; $autoload = $package->getAutoload(); - if ($this->devMode && $package === $mainPackage) { + if ($this->devMode && $package === $rootPackage) { $autoload = array_merge_recursive($autoload, $package->getDevAutoload()); } @@ -1067,7 +1071,7 @@ INITIALIZER; if (!isset($autoload[$type]) || !is_array($autoload[$type])) { continue; } - if (null !== $package->getTargetDir() && $package !== $mainPackage) { + if (null !== $package->getTargetDir() && $package !== $rootPackage) { $installPath = substr($installPath, 0, -strlen('/'.$package->getTargetDir())); } @@ -1075,7 +1079,7 @@ INITIALIZER; foreach ((array) $paths as $path) { if (($type === 'files' || $type === 'classmap' || $type === 'exclude-from-classmap') && $package->getTargetDir() && !is_readable($installPath.'/'.$path)) { // remove target-dir from file paths of the root package - if ($package === $mainPackage) { + if ($package === $rootPackage) { $targetDir = str_replace('\\', '[\\\\/]', preg_quote(str_replace(array('/', '\\'), '', $package->getTargetDir()))); $path = ltrim(preg_replace('{^'.$targetDir.'}', '', ltrim($path, '\\/')), '\\/'); } else { @@ -1141,11 +1145,11 @@ INITIALIZER; /** * Filters out dev-dependencies * - * @param array $packageMap - * @param PackageInterface $mainPackage + * @param array $packageMap + * @param RootPackageInterface $rootPackage * @return array */ - protected function filterPackageMap(array $packageMap, PackageInterface $mainPackage) + protected function filterPackageMap(array $packageMap, RootPackageInterface $rootPackage) { $packages = array(); $include = array(); @@ -1174,7 +1178,7 @@ INITIALIZER; } } }; - $add($mainPackage); + $add($rootPackage); return array_filter( $packageMap, diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index 1793156e0..25b54b6bb 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -17,6 +17,7 @@ use Composer\EventDispatcher\EventSubscriberInterface; use Composer\IO\IOInterface; use Composer\Package\CompletePackage; use Composer\Package\Package; +use Composer\Package\RootPackage; use Composer\Package\Version\VersionParser; use Composer\Repository\RepositoryInterface; use Composer\Repository\InstalledRepository; @@ -188,7 +189,7 @@ class PluginManager $autoloads[] = array($autoloadPackage, $downloadPath); } - $map = $generator->parseAutoloads($autoloads, new Package('dummy', '1.0.0.0', '1.0.0')); + $map = $generator->parseAutoloads($autoloads, new RootPackage('dummy/root-package', '1.0.0.0', '1.0.0')); $classLoader = $generator->createLoader($map); $classLoader->register(); diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index 53837e90f..e41c5040b 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -20,6 +20,7 @@ use Composer\Semver\Constraint\MatchAllConstraint; use Composer\Util\Filesystem; use Composer\Package\AliasPackage; use Composer\Package\Package; +use Composer\Package\RootPackage; use Composer\Test\TestCase; use Composer\Script\ScriptEvents; use Composer\Repository\InstalledRepositoryInterface; @@ -159,9 +160,9 @@ class AutoloadGeneratorTest extends TestCase } } - public function testMainPackageAutoloading() + public function testRootPackageAutoloading() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array( 'Main' => 'src/', @@ -204,9 +205,9 @@ class AutoloadGeneratorTest extends TestCase $this->assertAutoloadFiles('classmap', $this->vendorDir.'/composer', 'classmap'); } - public function testMainPackageDevAutoloading() + public function testRootPackageDevAutoloading() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array( 'Main' => 'src/', @@ -242,9 +243,9 @@ class AutoloadGeneratorTest extends TestCase $this->assertAutoloadFiles('files2', $this->vendorDir.'/composer', 'files'); } - public function testMainPackageDevAutoloadingDisabledByDefault() + public function testRootPackageDevAutoloadingDisabledByDefault() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array( 'Main' => 'src/', @@ -279,7 +280,7 @@ class AutoloadGeneratorTest extends TestCase { $this->vendorDir = $this->workingDir; - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Main' => 'src/', 'Lala' => 'src/'), 'psr-4' => array( @@ -306,9 +307,9 @@ class AutoloadGeneratorTest extends TestCase $this->assertAutoloadFiles('classmap3', $this->vendorDir.'/composer', 'classmap'); } - public function testMainPackageAutoloadingAlternativeVendorDir() + public function testRootPackageAutoloadingAlternativeVendorDir() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Main' => 'src/', 'Lala' => 'src/'), 'psr-4' => array( @@ -335,9 +336,9 @@ class AutoloadGeneratorTest extends TestCase $this->assertAutoloadFiles('classmap2', $this->vendorDir.'/composer', 'classmap'); } - public function testMainPackageAutoloadingWithTargetDir() + public function testRootPackageAutoloadingWithTargetDir() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Main\\Foo' => '', 'Main\\Bar' => ''), 'classmap' => array('Main/Foo/src', 'lib'), @@ -368,7 +369,7 @@ class AutoloadGeneratorTest extends TestCase public function testVendorsAutoloading() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -397,7 +398,7 @@ class AutoloadGeneratorTest extends TestCase public function testNonDevAutoloadExclusionWithRecursion() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), )); @@ -430,7 +431,7 @@ class AutoloadGeneratorTest extends TestCase public function testNonDevAutoloadShouldIncludeReplacedPackages() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array(new Link('a', 'a/a', new MatchAllConstraint()))); $packages = array(); @@ -464,7 +465,7 @@ class AutoloadGeneratorTest extends TestCase public function testNonDevAutoloadExclusionWithRecursionReplace() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), )); @@ -497,7 +498,7 @@ class AutoloadGeneratorTest extends TestCase public function testNonDevAutoloadReplacesNestedRequirements() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()) )); @@ -549,7 +550,7 @@ class AutoloadGeneratorTest extends TestCase public function testPharAutoload() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), )); @@ -590,7 +591,7 @@ class AutoloadGeneratorTest extends TestCase public function testPSRToClassMapIgnoresNonExistingDir() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Prefix' => 'foo/bar/non/existing/'), @@ -613,7 +614,7 @@ class AutoloadGeneratorTest extends TestCase public function testPSRToClassMapIgnoresNonPSRClasses() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('psr0_' => 'psr0/'), @@ -654,7 +655,7 @@ EOF; public function testVendorsClassMapAutoloading() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -694,7 +695,7 @@ EOF; public function testVendorsClassMapAutoloadingWithTargetDir() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -734,7 +735,7 @@ EOF; public function testClassMapAutoloadingEmptyDirAndExactFile() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -779,7 +780,7 @@ EOF; public function testClassMapAutoloadingAuthoritativeAndApcu() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -828,7 +829,7 @@ EOF; public function testClassMapAutoloadingAuthoritativeAndApcuPrefix() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), new Link('a', 'b/b', new MatchAllConstraint()), @@ -877,7 +878,7 @@ EOF; public function testFilesAutoloadGeneration() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array('files' => array('root.php'))); $package->setRequires(array( new Link('a', 'a/a', new MatchAllConstraint()), @@ -924,11 +925,11 @@ EOF; public function testFilesAutoloadGenerationRemoveExtraEntitiesFromAutoloadFiles() { - $autoloadPackage = new Package('a', '1.0', '1.0'); + $autoloadPackage = new RootPackage('root/a', '1.0', '1.0'); $autoloadPackage->setAutoload(array('files' => array('root.php'))); $autoloadPackage->setIncludePaths(array('/lib', '/src')); - $notAutoloadPackage = new Package('a', '1.0', '1.0'); + $notAutoloadPackage = new RootPackage('root/a', '1.0', '1.0'); $requires = array( new Link('a', 'a/a', new MatchAllConstraint()), @@ -999,7 +1000,7 @@ EOF; public function testFilesAutoloadOrderByDependencies() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array('files' => array('root2.php'))); $package->setRequires(array( new Link('a', 'z/foo', new MatchAllConstraint()), @@ -1069,12 +1070,12 @@ EOF; */ public function testOverrideVendorsAutoloading() { - $mainPackage = new Package('z', '1.0', '1.0'); - $mainPackage->setAutoload(array( + $rootPackage = new RootPackage('root/z', '1.0', '1.0'); + $rootPackage->setAutoload(array( 'psr-0' => array('A\\B' => $this->workingDir.'/lib'), 'classmap' => array($this->workingDir.'/src'), )); - $mainPackage->setRequires(array( + $rootPackage->setRequires(array( new Link('z', 'a/a', new MatchAllConstraint()), new Link('z', 'b/b', new MatchAllConstraint()), )); @@ -1156,7 +1157,7 @@ return array( EOF; - $this->generator->dump($this->config, $this->repository, $mainPackage, $this->im, 'composer', true, '_9'); + $this->generator->dump($this->config, $this->repository, $rootPackage, $this->im, 'composer', true, '_9'); $this->assertStringEqualsFile($this->vendorDir.'/composer/autoload_namespaces.php', $expectedNamespace); $this->assertStringEqualsFile($this->vendorDir.'/composer/autoload_psr4.php', $expectedPsr4); $this->assertStringEqualsFile($this->vendorDir.'/composer/autoload_classmap.php', $expectedClassmap); @@ -1164,7 +1165,7 @@ EOF; public function testIncludePathFileGeneration() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $packages = array(); $a = new Package("a/a", "1.0", "1.0"); @@ -1201,7 +1202,7 @@ EOF; public function testIncludePathsArePrependedInAutoloadFile() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $packages = array(); $a = new Package("a/a", "1.0", "1.0"); @@ -1230,9 +1231,9 @@ EOF; set_include_path($oldIncludePath); } - public function testIncludePathsInMainPackage() + public function testIncludePathsInRootPackage() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setIncludePaths(array('/lib', '/src')); $packages = array($a = new Package("a/a", "1.0", "1.0")); @@ -1261,7 +1262,7 @@ EOF; public function testIncludePathFileWithoutPathsIsSkipped() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $packages = array(); $a = new Package("a/a", "1.0", "1.0"); @@ -1290,7 +1291,7 @@ EOF; ->method('dispatchScript') ->with(ScriptEvents::POST_AUTOLOAD_DUMP, false); - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array('psr-0' => array('foo/bar/non/existing/'))); $this->repository->expects($this->once()) @@ -1303,7 +1304,7 @@ EOF; public function testUseGlobalIncludePath() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Main\\Foo' => '', 'Main\\Bar' => ''), )); @@ -1330,7 +1331,7 @@ EOF; $this->fs->ensureDirectoryExists($workingDir); chdir($workingDir); - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Foo' => 'src'), 'psr-4' => array('Acme\Foo\\' => 'src-psr4'), @@ -1442,7 +1443,7 @@ EOF; mkdir($workingDir, 0777, true); chdir($workingDir); - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Foo' => '../path/../src'), 'psr-4' => array('Acme\Foo\\' => '../path/../src-psr4'), @@ -1516,7 +1517,7 @@ EOF; public function testEmptyPaths() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Foo' => ''), 'psr-4' => array('Acme\Foo\\' => ''), @@ -1584,7 +1585,7 @@ EOF; public function testVendorSubstringPath() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array('Foo' => 'composer-test-autoload-src/src'), 'psr-4' => array('Acme\Foo\\' => 'composer-test-autoload-src/src-psr4'), @@ -1631,7 +1632,7 @@ EOF; public function testExcludeFromClassmap() { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setAutoload(array( 'psr-0' => array( 'Main' => 'src/', @@ -1703,7 +1704,7 @@ EOF; */ public function testGeneratesPlatformCheck(array $requires, $expectedFixture, array $provides = array(), array $replaces = array(), $ignorePlatformReqs = false) { - $package = new Package('a', '1.0', '1.0'); + $package = new RootPackage('root/a', '1.0', '1.0'); $package->setRequires($requires); if ($provides) { diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_files2.php b/tests/Composer/Test/Autoload/Fixtures/autoload_files2.php index 8972cdda8..7442a7eaf 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_files2.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_files2.php @@ -6,5 +6,5 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'e5e597abc575cc420a44914c612bb1b3' => $baseDir . '/devfiles/foo.php', + 'fd1502a3b53705310b21799d025f0dee' => $baseDir . '/devfiles/foo.php', ); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions.php b/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions.php index ca7d7ea05..0889edabc 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions.php @@ -10,5 +10,5 @@ return array( 'e56cac94f86c787e1efd645809df361d' => $vendorDir . '/b/b/test2.php', 'df8470dfa2ebd6b31da05b60fb4ec29a' => $vendorDir . '/c/c/foo/bar/test3.php', '68f1e24e6cd39de885cb5a47678e6518' => $vendorDir . '/c/c/foo/bar/test4.php', - '61b776fd0ee84fb7d7d958ae46118ded' => $baseDir . '/root.php', + '5e70d6595c54512c151823ca0663ab51' => $baseDir . '/root.php', ); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions_with_removed_extra.php b/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions_with_removed_extra.php index c584e079a..af3fd800a 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions_with_removed_extra.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_files_functions_with_removed_extra.php @@ -6,5 +6,5 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - '61b776fd0ee84fb7d7d958ae46118ded' => $baseDir . '/root.php', + '5e70d6595c54512c151823ca0663ab51' => $baseDir . '/root.php', ); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_files_target_dir.php b/tests/Composer/Test/Autoload/Fixtures/autoload_files_target_dir.php index 5e0c1e6a3..e2ca3d25e 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_files_target_dir.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_files_target_dir.php @@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'b419c11b924de79ffa740afc29a3dc16' => $baseDir . '/foo.php', - 'f558c96fbd0535aaa98981fa59ff7594' => $baseDir . '/bar.php', + 'b4b4f2eb2151c57cadbd5714a7aba8b7' => $baseDir . '/foo.php', + '99b24fc198db06c1d2d8118a8a5475eb' => $baseDir . '/bar.php', ); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_static_files_by_dependency.php b/tests/Composer/Test/Autoload/Fixtures/autoload_static_files_by_dependency.php index 0c5ce896d..e3659aee3 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_static_files_by_dependency.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_static_files_by_dependency.php @@ -12,7 +12,7 @@ class ComposerStaticInitFilesAutoloadOrder '8bceec6fdc149a1a6acbf7ad3cfed51c' => __DIR__ . '/..' . '/z/foo/testA.php', 'c5466e580c6c2403f225c43b6a21a96f' => __DIR__ . '/..' . '/b/bar/testB.php', '69dfc37c40a853a7cbac6c9d2367c5f4' => __DIR__ . '/..' . '/e/e/testE.php', - '334307692417e52db5a08c3271700a7e' => __DIR__ . '/../..' . '/root2.php', + 'ab280164f4754f5dfdb0721de84d737f' => __DIR__ . '/../..' . '/root2.php', ); public static $classMap = array ( diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions.php b/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions.php index e67b7803e..080c7fa04 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions.php @@ -11,7 +11,7 @@ class ComposerStaticInitFilesAutoload 'e56cac94f86c787e1efd645809df361d' => __DIR__ . '/..' . '/b/b/test2.php', 'df8470dfa2ebd6b31da05b60fb4ec29a' => __DIR__ . '/..' . '/c/c/foo/bar/test3.php', '68f1e24e6cd39de885cb5a47678e6518' => __DIR__ . '/..' . '/c/c/foo/bar/test4.php', - '61b776fd0ee84fb7d7d958ae46118ded' => __DIR__ . '/../..' . '/root.php', + '5e70d6595c54512c151823ca0663ab51' => __DIR__ . '/../..' . '/root.php', ); public static $classMap = array ( diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_include_paths.php b/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_include_paths.php index e67b7803e..080c7fa04 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_include_paths.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_static_functions_with_include_paths.php @@ -11,7 +11,7 @@ class ComposerStaticInitFilesAutoload 'e56cac94f86c787e1efd645809df361d' => __DIR__ . '/..' . '/b/b/test2.php', 'df8470dfa2ebd6b31da05b60fb4ec29a' => __DIR__ . '/..' . '/c/c/foo/bar/test3.php', '68f1e24e6cd39de885cb5a47678e6518' => __DIR__ . '/..' . '/c/c/foo/bar/test4.php', - '61b776fd0ee84fb7d7d958ae46118ded' => __DIR__ . '/../..' . '/root.php', + '5e70d6595c54512c151823ca0663ab51' => __DIR__ . '/../..' . '/root.php', ); public static $classMap = array ( diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_static_target_dir.php b/tests/Composer/Test/Autoload/Fixtures/autoload_static_target_dir.php index 60fd33faa..43840d989 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_static_target_dir.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_static_target_dir.php @@ -7,8 +7,8 @@ namespace Composer\Autoload; class ComposerStaticInitTargetDir { public static $files = array ( - 'b419c11b924de79ffa740afc29a3dc16' => __DIR__ . '/../..' . '/foo.php', - 'f558c96fbd0535aaa98981fa59ff7594' => __DIR__ . '/../..' . '/bar.php', + 'b4b4f2eb2151c57cadbd5714a7aba8b7' => __DIR__ . '/../..' . '/foo.php', + '99b24fc198db06c1d2d8118a8a5475eb' => __DIR__ . '/../..' . '/bar.php', ); public static $prefixesPsr0 = array (