Skip to content

Commit

Permalink
Revert "[Scoped] Require phpstan-src early before scoping (#6341)"
Browse files Browse the repository at this point in the history
This reverts commit 8c61186.
  • Loading branch information
samsonasik authored May 5, 2021
1 parent 8c61186 commit 9ce3067
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/build_scoped_rector_php70.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:
- run: |
composer require composer/composer
composer install --no-dev --ansi
composer config repositories.phpstan/phpstan-src vcs https://github.com/phpstan/phpstan-src
composer config minimum-stability dev
composer config prefer-stable true
rm -rf vendor/phpstan/phpstan
composer dump-autoload
composer require phpstan/phpstan-src
# 1. copy files to $NESTED_DIRECTORY directory Exclude the scoped/nested directories to prevent rsync from copying in a loop
- run: rsync --exclude rector-build-php70 -av * rector-build-php70 --quiet
Expand Down Expand Up @@ -84,6 +78,42 @@ jobs:

- run: cp -a rector-prefixed-downgraded-php70/. remote-repository-php70

-
name: Remove vendor/phpstan/phpstan
working-directory: remote-repository-php70
run: rm -rf vendor/phpstan/phpstan

-
name: Ensure autoload updated
working-directory: remote-repository-php70
run: composer dump-autoload

-
name: Register phpstan-src repo, set stability config
working-directory: remote-repository-php70
run: |
composer config repositories.phpstan/phpstan-src vcs https://github.com/phpstan/phpstan-src
composer config minimum-stability dev
composer config prefer-stable true
-
name: Require phpstan-src with ignore platform as in PHP 7.0
working-directory: remote-repository-php70
run: composer require phpstan/phpstan-src --ignore-platform-reqs

-
name: Downgrade phpstan
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
coverage: none
- run: sh build/downgrade-rector-php70.sh remote-repository-php70/vendor

-
name: Rollback composer.json
working-directory: remote-repository-php70
run: mv composer-move.json composer.json


# 7. setup git
-
working-directory: remote-repository-php70
Expand Down
16 changes: 16 additions & 0 deletions build/target-repository-php70/composer-move.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "rector/rector-prefixed-php70",
"description": "Prefixed and PHP 7.0 downgraded version of rector/rector",
"license": "MIT",
"bin": [
"bin/rector"
],
"require": {
"php": "^7.0|^8.0"
},
"extra": {
"branch-alias": {
"dev-main": "0.10-dev"
}
}
}

0 comments on commit 9ce3067

Please sign in to comment.