parent
66bf6d31c3
commit
33ffd5abc3
|
@ -24,7 +24,7 @@
|
|||
"require": {
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"composer/ca-bundle": "^1.5",
|
||||
"composer/class-map-generator": "^1.3.3",
|
||||
"composer/class-map-generator": "^1.4.0",
|
||||
"composer/metadata-minifier": "^1.0",
|
||||
"composer/semver": "^3.3",
|
||||
"composer/spdx-licenses": "^1.5.7",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d6685068b4f2660ec25263c8ecf9a367",
|
||||
"content-hash": "7c2f8d4d04b8146b2fcd203cb81fa8d5",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
|
@ -84,16 +84,16 @@
|
|||
},
|
||||
{
|
||||
"name": "composer/class-map-generator",
|
||||
"version": "1.3.4",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/class-map-generator.git",
|
||||
"reference": "b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3"
|
||||
"reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3",
|
||||
"reference": "b1b3fd0b4eaf3ddf3ee230bc340bf3fff454a1a3",
|
||||
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/98bbf6780e56e0fd2404fe4b82eb665a0f93b783",
|
||||
"reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -106,8 +106,8 @@
|
|||
"phpstan/phpstan-deprecation-rules": "^1",
|
||||
"phpstan/phpstan-phpunit": "^1",
|
||||
"phpstan/phpstan-strict-rules": "^1.1",
|
||||
"symfony/filesystem": "^5.4 || ^6",
|
||||
"symfony/phpunit-bridge": "^5"
|
||||
"phpunit/phpunit": "^8",
|
||||
"symfony/filesystem": "^5.4 || ^6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -137,7 +137,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/class-map-generator/issues",
|
||||
"source": "https://github.com/composer/class-map-generator/tree/1.3.4"
|
||||
"source": "https://github.com/composer/class-map-generator/tree/1.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -153,7 +153,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-06-12T14:13:04+00:00"
|
||||
"time": "2024-10-03T18:14:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/metadata-minifier",
|
||||
|
|
|
@ -173,7 +173,7 @@ class AutoloadGenerator
|
|||
* @throws \Seld\JsonLint\ParsingException
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function dump(Config $config, InstalledRepositoryInterface $localRepo, RootPackageInterface $rootPackage, InstallationManager $installationManager, string $targetDir, bool $scanPsrPackages = false, ?string $suffix = null, ?Locker $locker = null)
|
||||
public function dump(Config $config, InstalledRepositoryInterface $localRepo, RootPackageInterface $rootPackage, InstallationManager $installationManager, string $targetDir, bool $scanPsrPackages = false, ?string $suffix = null, ?Locker $locker = null, bool $strictAmbiguous = false)
|
||||
{
|
||||
if ($this->classMapAuthoritative) {
|
||||
// Force scanPsrPackages when classmap is authoritative
|
||||
|
@ -362,7 +362,12 @@ EOF;
|
|||
}
|
||||
|
||||
$classMap = $classMapGenerator->getClassMap();
|
||||
foreach ($classMap->getAmbiguousClasses() as $className => $ambiguousPaths) {
|
||||
if ($strictAmbiguous) {
|
||||
$ambiguousClasses = $classMap->getAmbiguousClasses(false);
|
||||
} else {
|
||||
$ambiguousClasses = $classMap->getAmbiguousClasses();
|
||||
}
|
||||
foreach ($ambiguousClasses as $className => $ambiguousPaths) {
|
||||
if (count($ambiguousPaths) > 1) {
|
||||
$this->io->writeError(
|
||||
'<warning>Warning: Ambiguous class resolution, "'.$className.'"'.
|
||||
|
|
|
@ -124,7 +124,8 @@ EOT
|
|||
'composer',
|
||||
$optimize,
|
||||
null,
|
||||
$composer->getLocker()
|
||||
$composer->getLocker(),
|
||||
$input->getOption('strict-ambiguous')
|
||||
);
|
||||
$numberOfClasses = count($classMap);
|
||||
|
||||
|
@ -140,7 +141,7 @@ EOT
|
|||
return 1;
|
||||
}
|
||||
|
||||
if ($input->getOption('strict-ambiguous') && count($classMap->getAmbiguousClasses()) > 0) {
|
||||
if ($input->getOption('strict-ambiguous') && count($classMap->getAmbiguousClasses(false)) > 0) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue