Skip to content

Commit b5ee473

Browse files
committed
Dropped compatibility with composer/composer:<2.0.14
As discussed in Ocramius/ProxyManager#700 As noted in Ocramius/ProxyManager#700 (comment) Since `composer/composer` broke BC in 2.0.14 by adding a runtime side-effect to a functionally pure API (`InstalledVersions::getRawData()`) it is safest to move away from it. Since `composer-runtime-api:2.1.0` is not yet available, the safest approach is to introduce a conflict with `composer/composer:<2.0.14` for now. In the next release, we'll drop this `conflict` block and add bump `composer-runtime-api` instead ( Ocramius/ProxyManager#702 ).
1 parent 5683c46 commit b5ee473

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"webimpress/safe-writer": "^2.2.0"
2626
},
2727
"conflict": {
28+
"composer/composer": "<2.0.14",
2829
"zendframework/zend-stdlib": "<3.2.1",
2930
"laminas/laminas-stdlib": "<3.2.1",
3031
"doctrine/annotations": "<1.6.1",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ProxyManager/Generator/Util/IdentifierSuffixer.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Composer\InstalledVersions;
88

9-
use function is_callable;
109
use function preg_match;
1110
use function serialize;
1211
use function sha1;
@@ -49,10 +48,6 @@ public static function getIdentifier(string $name): string
4948

5049
private static function loadBaseHashSalt(): string
5150
{
52-
return sha1(serialize(
53-
is_callable([InstalledVersions::class, 'getAllRawData'])
54-
? InstalledVersions::getAllRawData() // Composer >= 2.0.14
55-
: InstalledVersions::getRawData()
56-
));
51+
return sha1(serialize(InstalledVersions::getAllRawData()));
5752
}
5853
}

0 commit comments

Comments
 (0)