Skip to content

Commit d10a5ca

Browse files
committed
[TASK] Upgrade to PHPStan 2.x and Rector 2.x
Also add some more return type declarations as added by the new Rector version.
1 parent 36de90d commit d10a5ca

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ updates:
1616
interval: "daily"
1717
allow:
1818
- dependency-type: "development"
19+
ignore:
20+
- dependency-name: "phpstan/*"
21+
- dependency-name: "phpunit/phpunit"
22+
versions: [ ">= 9.0.0" ]
1923
versioning-strategy: "increase"
2024
commit-message:
2125
prefix: "[Dependabot] "

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"require-dev": {
3030
"php-parallel-lint/php-parallel-lint": "1.4.0",
3131
"phpstan/extension-installer": "1.4.3",
32-
"phpstan/phpstan": "1.12.9",
33-
"phpstan/phpstan-phpunit": "1.4.0",
32+
"phpstan/phpstan": "1.12.12 || 2.0.3",
33+
"phpstan/phpstan-phpunit": "1.4.1 || 2.0.1",
3434
"phpunit/phpunit": "8.5.40",
35-
"rector/rector": "1.2.10"
35+
"rector/rector": "1.2.10 || 2.0.0"
3636
},
3737
"suggest": {
3838
"ext-mbstring": "for parsing UTF-8 CSS"

config/phpstan-baseline.neon

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Call to an undefined method Sabberworm\\\\CSS\\\\OutputFormat\\:\\:setIndentation\\(\\)\\.$#"
4+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:setIndentation\(\)\.$#'
5+
identifier: method.notFound
56
count: 2
67
path: ../src/OutputFormat.php
78

89
-
9-
message: "#^Class Sabberworm\\\\CSS\\\\Value\\\\Size constructor invoked with 5 parameters, 1\\-4 required\\.$#"
10+
message: '#^Class Sabberworm\\CSS\\Value\\Size constructor invoked with 5 parameters, 1\-4 required\.$#'
11+
identifier: arguments.count
1012
count: 2
1113
path: ../src/RuleSet/DeclarationBlock.php
1214

15+
-
16+
message: '#^@covers value \\Sabberworm\\CSS\\Value\\Value\:\:parseValue\(\) references an invalid method\.$#'
17+
identifier: phpunit.coversMethod
18+
count: 2
19+
path: ../tests/ParserTest.php
20+

0 commit comments

Comments
 (0)