File tree Expand file tree Collapse file tree 6 files changed +69
-133
lines changed
tests/PHPStan/Rules/TooWideTypehints Expand file tree Collapse file tree 6 files changed +69
-133
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,27 @@ jobs:
47
47
- name : " Install dependencies"
48
48
run : " composer install --no-interaction --no-progress"
49
49
50
+ - name : " Change to simple-downgrade PHP version"
51
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
52
+ uses : " shivammathur/setup-php@v2"
53
+ with :
54
+ coverage : " none"
55
+ php-version : " 8.4"
56
+
50
57
- name : " Transform source code"
51
58
if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
52
59
run : |
53
60
composer install --no-interaction --no-progress --working-dir=compiler
54
61
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
55
62
composer dump
56
63
64
+ - name : " Re-store PHP version"
65
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
66
+ uses : " shivammathur/setup-php@v2"
67
+ with :
68
+ coverage : " none"
69
+ php-version : " ${{ matrix.php-version }}"
70
+
57
71
- name : " Validate Composer"
58
72
run : " composer validate"
59
73
Original file line number Diff line number Diff line change 57
57
- name : " Install dependencies"
58
58
run : " composer install --no-interaction --no-progress"
59
59
60
+ - name : " Change to simple-downgrade PHP version"
61
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
62
+ uses : " shivammathur/setup-php@v2"
63
+ with :
64
+ coverage : " none"
65
+ php-version : " 8.4"
66
+ ini-file : development
67
+ extensions : mbstring
68
+
60
69
- name : " Transform source code"
61
70
if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
62
71
shell : bash
65
74
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
66
75
composer dump
67
76
77
+ - name : " Re-store PHP version"
78
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
79
+ uses : " shivammathur/setup-php@v2"
80
+ with :
81
+ coverage : " none"
82
+ php-version : " ${{ matrix.php-version }}"
83
+ ini-file : development
84
+ extensions : mbstring
85
+
68
86
- name : " PHPStan"
69
87
run : " make phpstan"
70
88
Original file line number Diff line number Diff line change @@ -187,12 +187,34 @@ jobs:
187
187
shell : bash
188
188
run : " composer require --dev phpunit/phpunit:^9.6 brianium/paratest:^6.5 symfony/console:^5.4 symfony/process:^5.4 --update-with-dependencies --ignore-platform-reqs --working-dir=tests"
189
189
190
+ - name : " Change to simple-downgrade PHP version"
191
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
192
+ uses : " shivammathur/setup-php@v2"
193
+ with :
194
+ coverage : " none"
195
+ php-version : " 8.4"
196
+ tools : pecl
197
+ extensions : ds,mbstring
198
+ ini-file : development
199
+ ini-values : memory_limit=2G
200
+
190
201
- name : " Transform source code"
191
202
shell : bash
192
203
run : |
193
204
composer install --no-interaction --no-progress --working-dir=compiler
194
205
./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }}
195
206
composer dump
196
207
208
+ - name : " Re-store PHP version"
209
+ if : matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1'
210
+ uses : " shivammathur/setup-php@v2"
211
+ with :
212
+ coverage : " none"
213
+ php-version : " ${{ matrix.php-version }}"
214
+ tools : pecl
215
+ extensions : ds,mbstring
216
+ ini-file : development
217
+ ini-values : memory_limit=2G
218
+
197
219
- name : " Tests"
198
220
run : " make tests"
Original file line number Diff line number Diff line change 4
4
"description" : " PHAR Compiler for PHPStan" ,
5
5
"license" : [" MIT" ],
6
6
"require" : {
7
- "php" : " ^8.0 " ,
7
+ "php" : " ^8.2 " ,
8
8
"nette/neon" : " ^3.0.0" ,
9
- "ondrejmirtes/simple-downgrader" : " ^2.2.1 " ,
9
+ "ondrejmirtes/simple-downgrader" : " ^2.2.2 " ,
10
10
"seld/phar-utils" : " ^1.2" ,
11
11
"symfony/console" : " ^5.4.43" ,
12
12
"symfony/filesystem" : " ^5.4.43" ,
30
30
},
31
31
"config" : {
32
32
"platform" : {
33
- "php" : " 8.0 .99"
33
+ "php" : " 8.2 .99"
34
34
},
35
35
"platform-check" : false ,
36
36
"sort-packages" : true
Original file line number Diff line number Diff line change @@ -208,12 +208,14 @@ public function testBug10312b(): void
208
208
$ this ->analyse ([__DIR__ . '/data/bug-10312b.php ' ], []);
209
209
}
210
210
211
+ #[RequiresPhp('>= 8.1 ' )]
211
212
public function testBug10312c (): void
212
213
{
213
214
$ this ->checkProtectedAndPublicMethods = true ;
214
215
$ this ->analyse ([__DIR__ . '/data/bug-10312c.php ' ], []);
215
216
}
216
217
218
+ #[RequiresPhp('>= 8.1 ' )]
217
219
public function testBug10312d (): void
218
220
{
219
221
$ this ->checkProtectedAndPublicMethods = true ;
You can’t perform that action at this time.
0 commit comments