Skip to content

Commit 6526acc

Browse files
committed
Manual install ocramius/package-versions on build downgrade
1 parent 47693a2 commit 6526acc

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

bin/add-phpstan-self-replace.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
require __DIR__ . '/../vendor/autoload.php';
1212

13+
if (! class_exists(Versions::class)) {
14+
echo 'You need to run `composer require ocramius/package-versions` first' . PHP_EOL;
15+
exit(1);
16+
}
17+
1318
$composerJsonFileContents = FileSystem::read(__DIR__ . '/../composer.json');
1419

1520
$composerJson = Json::decode($composerJsonFileContents, forceArrays: true);

build/build-rector-scoped.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ wget https://github.com/humbug/php-scoper/releases/download/0.18.17/php-scoper.p
3232

3333
# avoid phpstan/phpstan dependency duplicate
3434
note "Remove PHPStan to avoid duplicating it"
35+
36+
composer require ocramius/package-versions --working-dir "$BUILD_DIRECTORY"
37+
3538
php "$BUILD_DIRECTORY/bin/add-phpstan-self-replace.php"
3639

3740
composer remove phpstan/phpstan -W --update-no-dev --working-dir "$BUILD_DIRECTORY"

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"illuminate/container": "^11.46",
2222
"nette/utils": "^4.0",
2323
"nikic/php-parser": "^5.6.1",
24-
"ocramius/package-versions": "^2.10",
2524
"ondram/ci-detector": "^4.2",
2625
"phpstan/phpdoc-parser": "^2.3",
2726
"phpstan/phpstan": "^2.1.26",

0 commit comments

Comments
 (0)