diff --git a/.github/workflows/build_scoped_rector_php70.yaml b/.github/workflows/build_scoped_rector_php70.yaml index 0242dfd1ab09..c8f90ff7c3df 100644 --- a/.github/workflows/build_scoped_rector_php70.yaml +++ b/.github/workflows/build_scoped_rector_php70.yaml @@ -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 @@ -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 diff --git a/build/target-repository-php70/composer-move.json b/build/target-repository-php70/composer-move.json new file mode 100644 index 000000000000..0979bc9a5c3b --- /dev/null +++ b/build/target-repository-php70/composer-move.json @@ -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" + } + } +}