Commit 74dee0d
committed
Fix running phpstan with newer PHP versions (e.g. 8.4)
phpstan 1.8 cannot run properly with PHP 8.4, but newer versions in the
1.x branch do, thus we change the requirement to phpstan ^1.9, to allow
version up to 2.0 (excluding).
Newer phpstan versions now detect common errors in regexes:
Ignored error #Template type T of function resolve[()]{2} is not referenced in a parameter.# has an unescaped '()' which leads to ignoring all errors. Use '\(\)' instead.
Ignored error #^Unsafe usage of new static[()]{2}.$# has an unescaped '()' which leads to ignoring all errors. Use '\(\)' instead.
So these regexes are also fixed by using non-evaluated string litterals
and escaping the parenthesis as recommended instead of using a weird
trick with the brackets.1 parent 29da25d commit 74dee0d
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments