Skip to content

Commit 4c18267

Browse files
Merge pull request #26 from dimitriBouteille/update-dev-dependencies
πŸ›Ÿ Update dev dependencies
2 parents 3ca2514 + b1eeb68 commit 4c18267

File tree

7 files changed

+22
-13
lines changed

7 files changed

+22
-13
lines changed

β€Ž.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'no_unused_imports' => true,
4343
'align_multiline_comment' => true,
4444
'array_indentation' => true,
45+
'blank_line_after_opening_tag' => false,
4546
'header_comment' => [
4647
'header' => $header,
4748
'comment_type' => 'PHPDoc',

β€Žcomposer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
}
3535
},
3636
"require-dev": {
37-
"friendsofphp/php-cs-fixer": "^3.57",
38-
"phpstan/phpstan": "^1.11",
39-
"rector/rector": "^1.1",
4037
"phpunit/phpunit": "^10.5",
41-
"phpstan/phpstan-phpunit": "^1.3",
42-
"phpstan/extension-installer": "^1.3",
43-
"szepeviktor/phpstan-wordpress": "^1.3",
44-
"roots/wordpress": "^6.5"
38+
"phpstan/phpstan": "^2.0",
39+
"rector/rector": "^2.0",
40+
"friendsofphp/php-cs-fixer": "^3.69",
41+
"phpstan/extension-installer": "^1.4",
42+
"szepeviktor/phpstan-wordpress": "^2.0",
43+
"phpstan/phpstan-phpunit": "^2.0",
44+
"roots/wordpress": "^6.7"
4545
},
4646
"config": {
4747
"allow-plugins": {
48-
"phpstan/extension-installer": true,
49-
"roots/wordpress-core-installer": true
48+
"roots/wordpress-core-installer": true,
49+
"phpstan/extension-installer": true
5050
}
5151
},
5252
"extra": {

β€Žphpstan.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
parameters:
22
level: 7
3-
checkGenericClassInNonGenericObjectType: false
43
paths:
54
- src
5+
ignoreErrors:
6+
-
7+
identifier: missingType.generics

β€Žrector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* Author: Dimitri BOUTEILLE <bonjour@dimitri-bouteille.fr>
77
*/
88

9-
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
109
use Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector;
1110
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
1211
use Rector\Config\RectorConfig;
@@ -31,6 +30,5 @@
3130
])
3231
->withSkip([
3332
SimplifyBoolIdenticalTrueRector::class,
34-
CallableThisArrayToAnonymousFunctionRector::class,
3533
SimplifyIfReturnBoolRector::class,
3634
]);

β€Žsrc/Helpers/Parser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public static function findClassName(?string $fileContent): ?string
4444

4545
$namespace = null;
4646
if (preg_match('#(^|\s)namespace(.*?)\s*;#sm', $fileContent, $m)) {
47+
// @phpstan-ignore-next-line
4748
$namespace = $m[2] ?? null;
49+
50+
// @phpstan-ignore-next-line
4851
$namespace = $namespace !== null ? trim($namespace) : null;
4952
}
5053

β€Žsrc/RouteLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ public function register(): void
151151
protected function buildRouteArgs(Route $route): array
152152
{
153153
$actions = [];
154-
$isDebug = $this->options?->debug ?? false;
154+
$isDebug = $this->options?->debug;
155+
if ($isDebug === null) {
156+
$isDebug = false;
157+
}
158+
155159
foreach ($route->actions as $action) {
156160
$actions[] = [
157161
'methods' => $action->methods,

β€Žtests/bootstrap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
$includeDirectory = __DIR__ . '/../web/wordpress/wp-includes';
1212

1313
$paths = [
14+
'/load.php',
1415
'/functions.php',
1516
'/plugin.php',
1617
'/class-wp-http-response.php',

0 commit comments

Comments
Β (0)