File tree Expand file tree Collapse file tree 11 files changed +57
-18
lines changed Expand file tree Collapse file tree 11 files changed +57
-18
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,15 @@ jobs:
39
39
coverage : " none"
40
40
php-version : " ${{ matrix.php-version }}"
41
41
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
+
42
46
- name : " Install dependencies"
43
47
run : " composer install --no-interaction --no-progress"
44
48
45
49
- 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 '
47
51
run : |
48
52
composer install --no-interaction --no-progress --working-dir=compiler
49
53
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
Original file line number Diff line number Diff line change 41
41
- name : " Install dependencies"
42
42
run : " composer install --no-interaction --no-progress"
43
43
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
+
44
48
- name : " Install compiler dependencies"
45
49
run : " composer install --no-interaction --no-progress --working-dir=compiler"
46
50
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ jobs:
100
100
run : " composer install --no-interaction --no-progress"
101
101
102
102
- 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 '
104
104
run : |
105
105
composer install --no-interaction --no-progress --working-dir=compiler
106
106
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
@@ -118,11 +118,15 @@ jobs:
118
118
- name : " Checkout"
119
119
uses : actions/checkout@v4
120
120
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
+
121
125
- name : " Install dependencies"
122
126
run : " composer install --no-interaction --no-progress"
123
127
124
128
- 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 '
126
130
run : |
127
131
composer install --no-interaction --no-progress --working-dir=compiler
128
132
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
Original file line number Diff line number Diff line change @@ -48,18 +48,22 @@ jobs:
48
48
ini-file : development
49
49
extensions : mbstring
50
50
51
+ - name : " Downgrade PHPUnit"
52
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0'
53
+ shell : bash
54
+ run : " composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
55
+
51
56
- name : " Install dependencies"
52
57
run : " composer install --no-interaction --no-progress"
53
58
54
59
- 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 '
60
+ if : matrix.php-version = = '7.4' || matrix.php-version = = '8.0 '
56
61
shell : bash
57
62
run : |
58
63
composer install --no-interaction --no-progress --working-dir=compiler
59
64
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
60
65
composer dump
61
66
62
-
63
67
- name : " PHPStan"
64
68
run : " make phpstan"
65
69
Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ jobs:
107
107
ini-file : development
108
108
ini-values : memory_limit=1G
109
109
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 "
110
+ - name : " Install dependencies "
111
+ run : " composer install --no-interaction --no-progress "
112
112
113
113
- id : set-matrix
114
114
run : echo "matrix=$(php .github/workflows/tests-levels-matrix.php)" >> $GITHUB_OUTPUT
@@ -175,12 +175,13 @@ jobs:
175
175
ini-file : development
176
176
ini-values : memory_limit=2G
177
177
178
+ - name : " Downgrade PHPUnit"
179
+ shell : bash
180
+ run : " composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs"
181
+
178
182
- name : " Install dependencies"
179
183
run : " composer install --no-interaction --no-progress"
180
184
181
- - name : " Downgrade PHPUnit"
182
- run : " composer require --dev phpunit/phpunit:^9.6 --update-with-dependencies"
183
-
184
185
- name : " Transform source code"
185
186
shell : bash
186
187
run : |
Original file line number Diff line number Diff line change 33
33
$ includes [] = __DIR__ . '/deprecated-8.4.neon ' ;
34
34
}
35
35
36
+ if (PHP_VERSION_ID < 80100 ) {
37
+ $ includes [] = __DIR__ . '/old-phpunit.neon ' ;
38
+ } else {
39
+ $ includes [] = __DIR__ . '/new-phpunit.neon ' ;
40
+ }
36
41
$ config = [];
37
42
$ config ['includes ' ] = $ includes ;
38
43
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ ignoreErrors :
3
+ -
4
+ message : ' #^Call to an undefined static method PHPUnit\\Framework\\TestCase\:\:assertFileNotExists\(\)\.$#'
5
+ identifier : staticMethod.notFound
6
+ count : 1
7
+ path : ../src/Testing/LevelsTestCase.php
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ ignoreErrors :
3
+ -
4
+ message : ' #^Instanceof references internal interface PHPUnit\\Exception\.$#'
5
+ identifier : instanceof.internalInterface
6
+ count : 1
7
+ path : ../tests/PHPStan/Reflection/ReflectionProviderGoldenTest.php
8
+
9
+ -
10
+ message : '''
11
+ #^Call to deprecated method assertFileNotExists\(\) of class PHPUnit\\Framework\\Assert\:
12
+ https\://github\.com/sebastianbergmann/phpunit/issues/4077$#
13
+ '''
14
+ identifier : staticMethod.deprecated
15
+ count : 1
16
+ path : ../src/Testing/LevelsTestCase.php
Original file line number Diff line number Diff line change 38
38
"react/promise" : " ^3.2" ,
39
39
"react/socket" : " ^1.3" ,
40
40
"react/stream" : " ^1.1" ,
41
- "sebastian/diff" : " ^4.0 || ^ 5.0" ,
41
+ "sebastian/diff" : " ^5.0" ,
42
42
"symfony/console" : " ^5.4.3" ,
43
43
"symfony/finder" : " ^5.4.3" ,
44
44
"symfony/polyfill-intl-grapheme" : " ^1.23" ,
Original file line number Diff line number Diff line change @@ -747,12 +747,6 @@ parameters:
747
747
count : 1
748
748
path : src/Rules/RuleLevelHelper.php
749
749
750
- -
751
- message : ' #^Call to an undefined static method PHPUnit\\Framework\\TestCase\:\:assertFileNotExists\(\)\.$#'
752
- identifier : staticMethod.notFound
753
- count : 1
754
- path : src/Testing/LevelsTestCase.php
755
-
756
750
-
757
751
message : ' #^Call to function method_exists\(\) with ' ' PHPUnit\\\\Framework\\\\TestCase' ' and ' ' assertFileDoesNotEx…' ' will always evaluate to true\.$#'
758
752
identifier : function.alreadyNarrowedType
You can’t perform that action at this time.
0 commit comments