From a26d0b53f6db62166140be1ef7508663e04ade99 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 5 May 2021 17:09:21 +0700 Subject: [PATCH] [Scoped] Require phpstan-src early before scoping --- .../workflows/build_scoped_rector_php70.yaml | 42 +++---------------- .../composer-move.json | 16 ------- 2 files changed, 6 insertions(+), 52 deletions(-) delete mode 100644 build/target-repository-php70/composer-move.json diff --git a/.github/workflows/build_scoped_rector_php70.yaml b/.github/workflows/build_scoped_rector_php70.yaml index c8f90ff7c3df..0242dfd1ab09 100644 --- a/.github/workflows/build_scoped_rector_php70.yaml +++ b/.github/workflows/build_scoped_rector_php70.yaml @@ -36,6 +36,12 @@ 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 @@ -78,42 +84,6 @@ 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 deleted file mode 100644 index 0979bc9a5c3b..000000000000 --- a/build/target-repository-php70/composer-move.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "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" - } - } -}