Skip to content

Commit 3528277

Browse files
committed
Upgrade phpstan
Upgrade phpstan, and rulesets. Use the phpstan extension loader, to ensure added rulesets are loaded automatically. Fix the typehint of secondfactor.id to varchar, as it is not an int in the db. Also fix `doctrine.finalConstructor`.
1 parent 9a452ae commit 3528277

File tree

5 files changed

+148
-97
lines changed

5 files changed

+148
-97
lines changed

ci/qa/phpstan.neon

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
includes:
22
- ./phpstan-baseline.php
3-
- ../../vendor/phpstan/phpstan-symfony/extension.neon
4-
- ../../vendor/phpstan/phpstan-deprecation-rules/rules.neon
5-
rules:
6-
# Put here your cutom rules for this repository
7-
# - Surfnet\NoDebugFunctionRule
8-
# - Surfnet\InvokableControllerRule
9-
# - Surfnet\UntypedIdParamRule
10-
# - Surfnet\NoNullOrArrayReturnRule
3+
114
parameters:
125
checkUninitializedProperties: true
136
level: 1

composer.json

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,19 @@
6767
"mockery/mockery": "^1.6.12",
6868
"overtrue/phplint": ">=9.6.2",
6969
"phpmd/phpmd": "^2.15",
70-
"phpstan/phpstan-deprecation-rules": "^1.2.1",
71-
"phpstan/phpstan-doctrine": "^1.5.7",
72-
"phpstan/phpstan-mockery": "^1.1.3",
73-
"phpstan/phpstan-phpunit": "^1.4.2",
74-
"phpstan/phpstan-symfony": "^1.4.16",
70+
"phpstan/extension-installer": "^1.4",
71+
"phpstan/phpstan": "^2.1.31",
72+
"phpstan/phpstan-deprecation-rules": "^2.0.3",
73+
"phpstan/phpstan-doctrine": "^2.0.10",
74+
"phpstan/phpstan-mockery": "^2.0",
75+
"phpstan/phpstan-phpunit": "^2.0.7",
76+
"phpstan/phpstan-symfony": "^2.0.8",
7577
"phpunit/phpunit": "^9.6.29",
7678
"ramsey/uuid": "^4.9.1",
77-
"rector/rector": "^1.2.10",
79+
"rector/rector": "^2.2.7",
7880
"sebastian/exporter": "^4.0.8",
7981
"sebastian/phpcpd": "^6.0.3",
80-
"slevomat/coding-standard": "^8.22.1",
82+
"slevomat/coding-standard": "^8.22",
8183
"squizlabs/php_codesniffer": "^3.13.4",
8284
"symfony/browser-kit": "6.4.*",
8385
"symfony/phpunit-bridge": "^7.3.4",
@@ -128,10 +130,11 @@
128130
},
129131
"config": {
130132
"allow-plugins": {
131-
"symfony/flex": true,
132-
"symfony/runtime": true,
133133
"dealerdirect/phpcodesniffer-composer-installer": true,
134-
"endroid/installer": true
134+
"endroid/installer": true,
135+
"phpstan/extension-installer": true,
136+
"symfony/flex": true,
137+
"symfony/runtime": true
135138
},
136139
"optimize-autoloader": true,
137140
"sort-packages": true,
@@ -173,7 +176,13 @@
173176
{
174177
"file": "config/openconext/global_view_parameters.yaml"
175178
}
176-
]
179+
],
180+
"phpstan/extension-installer": {
181+
"ignore": [
182+
"surfnet/stepup-bundle",
183+
"surfnet/stepup-saml-bundle"
184+
]
185+
}
177186
},
178187
"type": "project"
179188
}

0 commit comments

Comments
 (0)