1
0
Fork 0

Merge branch 'master' into 2.0

pull/8684/head
Jordi Boggiano 2020-03-11 09:34:55 +01:00
commit 97e2a249e8
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
### [1.10.0] 2020-03-10 ### [1.10.0] 2020-03-10
* Added `bearer` auth config to authenticate using `Authorization: Bearer <token>` headers * Added `bearer` auth config to authenticate using `Authorization: Bearer <token>` headers
* Added `plugin-api-version` in composer.lock so future Composer versions know if they are running a lock file which was not built by the correct version * Added `plugin-api-version` in composer.lock so third-party tools can know which Composer version was used to generate a lock file
* Fixed composer fund command and funding info parsing to be more useful * Fixed composer fund command and funding info parsing to be more useful
* Fixed issue where --no-dev autoload generation was excluding some packages which should not have been excluded * Fixed issue where --no-dev autoload generation was excluding some packages which should not have been excluded
* Fixed 1.10-RC regression in create project's handling of absolute paths * Fixed 1.10-RC regression in create project's handling of absolute paths

View File

@ -137,6 +137,11 @@ class RootPackageLoader extends ArrayLoader
$aliases = $this->extractAliases($links, $aliases); $aliases = $this->extractAliases($links, $aliases);
$stabilityFlags = $this->extractStabilityFlags($links, $stabilityFlags, $realPackage->getMinimumStability()); $stabilityFlags = $this->extractStabilityFlags($links, $stabilityFlags, $realPackage->getMinimumStability());
$references = $this->extractReferences($links, $references); $references = $this->extractReferences($links, $references);
if (isset($links[$config['name']])) {
throw new \RuntimeException(sprintf('Root package \'%s\' cannot require itself in its composer.json' . PHP_EOL .
'Did you accidentally name your root package after an external package?', $config['name']));
}
} }
} }
@ -150,11 +155,6 @@ class RootPackageLoader extends ArrayLoader
} }
} }
if (isset($links[$config['name']])) {
throw new \InvalidArgumentException(sprintf('Root package \'%s\' cannot require itself in its composer.json' . PHP_EOL .
'Did you accidentally name your root package after an external package?', $config['name']));
}
$realPackage->setAliases($aliases); $realPackage->setAliases($aliases);
$realPackage->setStabilityFlags($stabilityFlags); $realPackage->setStabilityFlags($stabilityFlags);
$realPackage->setReferences($references); $realPackage->setReferences($references);

View File

@ -10,7 +10,7 @@ Tries to require a package with the same name as the root package
--RUN-- --RUN--
install install
--EXPECT-EXCEPTION-- --EXPECT-EXCEPTION--
InvalidArgumentException RuntimeException
--EXPECT-- --EXPECT--
Root package 'foo/bar' cannot require itself in its composer.json Root package 'foo/bar' cannot require itself in its composer.json
Did you accidentally name your root package after an external package? Did you accidentally name your root package after an external package?