Skip to content

Commit d5cb046

Browse files
committed
Downgrade PHPUnit on 7.4 and 8.0
1 parent 9c85f53 commit d5cb046

File tree

7 files changed

+25
-13
lines changed

7 files changed

+25
-13
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ jobs:
3939
coverage: "none"
4040
php-version: "${{ matrix.php-version }}"
4141

42+
- name: "Downgrade PHPUnit"
43+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
44+
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
45+
4246
- name: "Install dependencies"
4347
run: "composer install --no-interaction --no-progress"
4448

4549
- name: "Transform source code"
46-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3' && matrix.php-version != '8.4'
50+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
4751
run: |
4852
composer install --no-interaction --no-progress --working-dir=compiler
4953
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}

.github/workflows/phar.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
- name: "Install dependencies"
4242
run: "composer install --no-interaction --no-progress"
4343

44+
# only sebastian/diff ^4 supports PHP 7.4 so we need that in the PHAR
45+
- name: "Downgrade PHPUnit"
46+
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
47+
4448
- name: "Install compiler dependencies"
4549
run: "composer install --no-interaction --no-progress --working-dir=compiler"
4650

.github/workflows/reflection-golden-test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
run: "composer install --no-interaction --no-progress"
101101

102102
- name: "Transform source code"
103-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3' && matrix.php-version != '8.4'
103+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
104104
run: |
105105
composer install --no-interaction --no-progress --working-dir=compiler
106106
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
@@ -118,11 +118,15 @@ jobs:
118118
- name: "Checkout"
119119
uses: actions/checkout@v4
120120

121+
- name: "Downgrade PHPUnit"
122+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
123+
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
124+
121125
- name: "Install dependencies"
122126
run: "composer install --no-interaction --no-progress"
123127

124128
- name: "Transform source code"
125-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3' && matrix.php-version != '8.4'
129+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
126130
run: |
127131
composer install --no-interaction --no-progress --working-dir=compiler
128132
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}

.github/workflows/static-analysis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,21 @@ jobs:
4848
ini-file: development
4949
extensions: mbstring
5050

51+
- name: "Downgrade PHPUnit"
52+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
53+
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
54+
5155
- name: "Install dependencies"
5256
run: "composer install --no-interaction --no-progress"
5357

5458
- name: "Transform source code"
55-
if: matrix.php-version != '8.1' && matrix.php-version != '8.2' && matrix.php-version != '8.3' && matrix.php-version != '8.4'
59+
if: matrix.php-version == '7.4' || matrix.php-version == '8.0'
5660
shell: bash
5761
run: |
5862
composer install --no-interaction --no-progress --working-dir=compiler
5963
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
6064
composer dump
6165
62-
6366
- name: "PHPStan"
6467
run: "make phpstan"
6568

.github/workflows/tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ jobs:
107107
ini-file: development
108108
ini-values: memory_limit=1G
109109

110-
- name: "Install PHPUnit 10.x"
111-
run: "composer remove --dev brianium/paratest && composer require --dev --with-all-dependencies phpunit/phpunit:^10 sebastian/diff:^5.0"
112-
113110
- id: set-matrix
114111
run: echo "matrix=$(php .github/workflows/tests-levels-matrix.php)" >> $GITHUB_OUTPUT
115112

@@ -175,12 +172,12 @@ jobs:
175172
ini-file: development
176173
ini-values: memory_limit=2G
177174

175+
- name: "Downgrade PHPUnit"
176+
run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
177+
178178
- name: "Install dependencies"
179179
run: "composer install --no-interaction --no-progress"
180180

181-
- name: "Downgrade PHPUnit"
182-
run: "composer require --dev phpunit/phpunit:^9.6 --update-with-dependencies"
183-
184181
- name: "Transform source code"
185182
shell: bash
186183
run: |

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"react/promise": "^3.2",
3939
"react/socket": "^1.3",
4040
"react/stream": "^1.1",
41-
"sebastian/diff": "^4.0 || ^5.0",
41+
"sebastian/diff": "^5.0",
4242
"symfony/console": "^5.4.3",
4343
"symfony/finder": "^5.4.3",
4444
"symfony/polyfill-intl-grapheme": "^1.23",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)