@@ -30,16 +30,27 @@ note "Starts"
3030note " Downloading php-scoper.phar"
3131wget https://github.com/humbug/php-scoper/releases/download/0.18.17/php-scoper.phar -N --no-verbose
3232
33- # avoid phpstan/phpstan dependency duplicate
34- note " Remove PHPStan to avoid duplicating it"
35-
33+ # make PackageVersions exists
34+ # here while wait for PHP 8.5 compatible code
35+ # see https://github.com/Ocramius/PackageVersions/pull/270
36+ # to allow us on rector to create downgrade PHP 8.5 rules with define
37+ #
38+ # #[RequiresPhp('>= 8.5')]
39+ #
40+ # On Downgrade PHP 8.5 rule, see https://github.com/rectorphp/rector-downgrade-php/pull/337
41+ #
3642composer require ocramius/package-versions --working-dir " $BUILD_DIRECTORY "
3743
3844php " $BUILD_DIRECTORY /bin/add-phpstan-self-replace.php"
3945
46+ # avoid phpstan/phpstan and ocramius/package-versions dependency duplicate
47+ note " Remove PHPStan and PackageVersions to avoid duplicating it"
48+
4049composer remove phpstan/phpstan -W --update-no-dev --working-dir " $BUILD_DIRECTORY "
4150composer remove ocramius/package-versions -W --update-no-dev --working-dir " $BUILD_DIRECTORY "
4251
52+ note " PHPStan and PackageVersions now removed, safe to start php-scoper from here"
53+
4354# Work around possible PHP memory limits
4455note " Running php-scoper on /bin, /config, /src, /rules and /vendor"
4556php -d memory_limit=-1 php-scoper.phar add-prefix bin config src rules vendor composer.json UPGRADING.md --output-dir " ../$RESULT_DIRECTORY " --config scoper.php --force --ansi --working-dir " $BUILD_DIRECTORY " ;
0 commit comments