From d9a80e764e81ac84354a2d29be7653c70bc4c97d Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 11 Oct 2025 15:49:10 +0700 Subject: [PATCH 1/5] Add test for require global install for PHPUnit 12 --- .github/workflows/compat_tests.yaml.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/compat_tests.yaml.yml b/.github/workflows/compat_tests.yaml.yml index e5f9131..d51ee8b 100644 --- a/.github/workflows/compat_tests.yaml.yml +++ b/.github/workflows/compat_tests.yaml.yml @@ -36,6 +36,12 @@ jobs: name: 'Rector dev + PHPUnit 12' run: composer require "phpunit/phpunit:12.*" "rector/rector:dev-main" -W php: 8.3 + - + name: 'Rector dev + PHPUnit 12 global install' + run: | + composer global require --dev "phpunit/phpunit:12.*" -W + composer require --dev "rector/rector:dev-main" -W + php: 8.3 name: ${{ matrix.actions.name }} From 0b8aa688ee8f07b0720fb68b7ab6f201505f6fc9 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 11 Oct 2025 15:50:19 +0700 Subject: [PATCH 2/5] remove local first --- .github/workflows/compat_tests.yaml.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compat_tests.yaml.yml b/.github/workflows/compat_tests.yaml.yml index d51ee8b..7c6fb0e 100644 --- a/.github/workflows/compat_tests.yaml.yml +++ b/.github/workflows/compat_tests.yaml.yml @@ -39,6 +39,7 @@ jobs: - name: 'Rector dev + PHPUnit 12 global install' run: | + composer remove phpunit/phpunit -W composer global require --dev "phpunit/phpunit:12.*" -W composer require --dev "rector/rector:dev-main" -W php: 8.3 From 34417a445e515083e0af9f19901d3645e7015309 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 11 Oct 2025 15:53:27 +0700 Subject: [PATCH 3/5] add separate workflow --- .github/workflows/compat_tests.yaml.yml | 7 --- .../workflows/compat_tests_global.yaml.yml | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/compat_tests_global.yaml.yml diff --git a/.github/workflows/compat_tests.yaml.yml b/.github/workflows/compat_tests.yaml.yml index 7c6fb0e..e5f9131 100644 --- a/.github/workflows/compat_tests.yaml.yml +++ b/.github/workflows/compat_tests.yaml.yml @@ -36,13 +36,6 @@ jobs: name: 'Rector dev + PHPUnit 12' run: composer require "phpunit/phpunit:12.*" "rector/rector:dev-main" -W php: 8.3 - - - name: 'Rector dev + PHPUnit 12 global install' - run: | - composer remove phpunit/phpunit -W - composer global require --dev "phpunit/phpunit:12.*" -W - composer require --dev "rector/rector:dev-main" -W - php: 8.3 name: ${{ matrix.actions.name }} diff --git a/.github/workflows/compat_tests_global.yaml.yml b/.github/workflows/compat_tests_global.yaml.yml new file mode 100644 index 0000000..033f3ae --- /dev/null +++ b/.github/workflows/compat_tests_global.yaml.yml @@ -0,0 +1,43 @@ +name: Compat Tests for global install + +on: + pull_request: null + push: + branches: + - main + +jobs: + compat_tests: + strategy: + fail-fast: false + matrix: + actions: + - + name: 'Rector dev + PHPUnit 12 global install' + run: | + composer remove phpunit/phpunit -W + composer global require --dev "phpunit/phpunit:12.*" -W + composer require --dev "rector/rector:dev-main" -W + php: 8.3 + + name: ${{ matrix.actions.name }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.actions.php }} + coverage: none + + - uses: "ramsey/composer-install@v2" + - run: ${{ matrix.actions.run }} + + - run: phpunit tests/PHPStan + + - run: phpunit tests/Rector + + - run: phpunit From ede34d2ebb09dc9d536c6f3a1e9484d7e0210dea Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 11 Oct 2025 15:54:17 +0700 Subject: [PATCH 4/5] add separate workflow --- .github/workflows/compat_tests_global.yaml.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compat_tests_global.yaml.yml b/.github/workflows/compat_tests_global.yaml.yml index 033f3ae..54b4ec0 100644 --- a/.github/workflows/compat_tests_global.yaml.yml +++ b/.github/workflows/compat_tests_global.yaml.yml @@ -15,7 +15,7 @@ jobs: - name: 'Rector dev + PHPUnit 12 global install' run: | - composer remove phpunit/phpunit -W + composer remove --dev phpunit/phpunit -W composer global require --dev "phpunit/phpunit:12.*" -W composer require --dev "rector/rector:dev-main" -W php: 8.3 From c0b68e69bfa6e1d40ac08f78251c7cdd0ed124a7 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 11 Oct 2025 17:51:05 +0700 Subject: [PATCH 5/5] add use rector stable --- .github/workflows/compat_tests_global.yaml.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/compat_tests_global.yaml.yml b/.github/workflows/compat_tests_global.yaml.yml index 54b4ec0..e14d0f9 100644 --- a/.github/workflows/compat_tests_global.yaml.yml +++ b/.github/workflows/compat_tests_global.yaml.yml @@ -20,6 +20,14 @@ jobs: composer require --dev "rector/rector:dev-main" -W php: 8.3 + - + name: 'Rector stable + PHPUnit 12 global install' + run: | + composer remove --dev phpunit/phpunit -W + composer global require --dev "phpunit/phpunit:12.*" -W + composer require --dev "rector/rector:^2.2" -W + php: 8.3 + name: ${{ matrix.actions.name }} runs-on: ubuntu-latest