Skip to content

Commit

Permalink
[Scoper] Downgrade rector.php as well for PHP 7.0 void (#6177)
Browse files Browse the repository at this point in the history
* [Scoper] Downgrade rector.php as well for PHP 7.0 void

* run on rector.php in rector-build as well
  • Loading branch information
samsonasik authored Apr 20, 2021
1 parent 49ca43c commit 201c73d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_scoped_rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
- run: rm -rf rector-build/packages-tests rector-build/rules-tests rector-build/tests

# 2. downgrade rector
- run: sh build/downgrade-rector.sh rector-build
- run: |
php -d memory_limit=-1 bin/rector process bin rector.php --config build/config/config-downgrade.php --working-dir rector-build --ansi
sh build/downgrade-rector.sh rector-build
# 3. prefix classes
- run: sh build/build-rector-scoped.sh rector-build rector-prefixed-downgraded
Expand Down
2 changes: 1 addition & 1 deletion build/downgrade-rector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BUILD_DIRECTORY=$1
echo "[NOTE] Running downgrade in '$BUILD_DIRECTORY' directory\n";

# 3. provide directories to downgrade; includes the rector dirs
directories=$(php -d memory_limit=-1 bin/rector downgrade-paths 7.1 --config build/config/config-downgrade.php --working-dir $BUILD_DIRECTORY --ansi)
directories=$(php -d memory_limit=-1 bin/rector downgrade-paths 7.0 --config build/config/config-downgrade.php --working-dir $BUILD_DIRECTORY --ansi)

# split array see https://stackoverflow.com/a/1407098/1348344
export IFS=";"
Expand Down
2 changes: 1 addition & 1 deletion build/target-repository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Do you have conflicts on Rector install? You're in the right place. Prefixed Rector can [be installed even on very old Symfony](https://getrector.org/blog/2020/01/20/how-to-install-rector-despite-composer-conflicts).

Do you have older PHP? Rector prefixed goes down to PHP 7.1, so you can install it even on older projects.
Do you have older PHP? Rector prefixed goes down to PHP 7.0, so you can install it even on older projects.

## Install

Expand Down

0 comments on commit 201c73d

Please sign in to comment.