Skip to content

Commit

Permalink
Back to php-scoper 0.14 with scoping from php 8.0 (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed May 27, 2022
1 parent 0fd045c commit a2d6da8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/build_scoped_rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ jobs:
# 2. downgrade rector
- run: sh build/downgrade-rector.sh rector-build

# scoped using php-scoper.phar which require #[\ReturnTypeWillChange] inside so use php 8.0 for scoping
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none

# fixes https://github.com/rectorphp/rector/pull/4559/checks?check_run_id=1359814403, see https://github.com/shivammathur/setup-php#composer-github-oauth
env:
COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN }}

# 3. prefix classes
- run: sh build/build-rector-scoped.sh rector-build rector-prefixed-downgraded

Expand Down
2 changes: 1 addition & 1 deletion build/build-rector-scoped.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rm -f "$BUILD_DIRECTORY/phpstan-for-rector.neon"

# 2. scope it
note "Running scoper to $RESULT_DIRECTORY"
wget https://github.com/humbug/php-scoper/releases/download/0.17.2/php-scoper.phar -N --no-verbose
wget https://github.com/humbug/php-scoper/releases/download/0.14.0/php-scoper.phar -N --no-verbose

# Work around possible PHP memory limits

Expand Down

0 comments on commit a2d6da8

Please sign in to comment.