Skip to content

Commit c451f2e

Browse files
committed
Add note for use of package-versions on downgrade
1 parent 07d57ec commit c451f2e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

build/build-rector-scoped.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,27 @@ note "Starts"
3030
note "Downloading php-scoper.phar"
3131
wget 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+
#
3642
composer require ocramius/package-versions --working-dir "$BUILD_DIRECTORY"
3743

3844
php "$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+
4049
composer remove phpstan/phpstan -W --update-no-dev --working-dir "$BUILD_DIRECTORY"
4150
composer 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
4455
note "Running php-scoper on /bin, /config, /src, /rules and /vendor"
4556
php -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

Comments
 (0)