Skip to content

Commit

Permalink
Update PHPStan to 1.0, rector to 0.12.x (redaxo#4874)
Browse files Browse the repository at this point in the history
Co-authored-by: Gregor Harlan <330436+gharlan@users.noreply.github.com>
  • Loading branch information
2 people authored and BenJ1337 committed Mar 6, 2022
1 parent 68f5e81 commit 48a465d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .tools/phpstan/baseline.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Dead catch \\- Throwable is never thrown in the try block\\.$#"
count: 1
path: ../../redaxo/src/addons/cronjob/lib/types/phpcode.php

-
message: "#^Parameter \\#3 \\$alias of class PharData constructor expects string, null given\\.$#"
count: 1
Expand Down Expand Up @@ -126,7 +121,7 @@ parameters:
path: ../../redaxo/src/core/lib/autoload.php

-
message: "#^Parameter \\#1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\)\\: void, array\\('rex_autoload', 'autoload'\\) given\\.$#"
message: "#^Parameter \\#1 \\$autoload_function of function spl_autoload_register expects callable\\(string\\)\\: void, array\\{'rex_autoload', 'autoload'\\} given\\.$#"
count: 1
path: ../../redaxo/src/core/lib/autoload.php

Expand Down Expand Up @@ -261,7 +256,7 @@ parameters:
path: ../../redaxo/src/core/tests/base/instance_list_pool_trait_test.php

-
message: "#^Parameter \\#3 \\$createListCallback of static method rex_test_instance_list_pool\\:\\:getInstanceList\\(\\) expects \\(callable\\(\\.\\.\\.mixed\\)\\: array\\)\\|null, Closure\\(mixed, mixed\\)\\: array\\(\\) given\\.$#"
message: "#^Parameter \\#3 \\$createListCallback of static method rex_test_instance_list_pool\\:\\:getInstanceList\\(\\) expects \\(callable\\(\\.\\.\\.mixed\\)\\: array\\)\\|null, Closure\\(mixed, mixed\\)\\: array\\{\\} given\\.$#"
count: 1
path: ../../redaxo/src/core/tests/base/instance_list_pool_trait_test.php

Expand Down
3 changes: 1 addition & 2 deletions .tools/psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5776,14 +5776,13 @@
</MixedAssignment>
</file>
<file src="redaxo/src/core/lib/setup/setup.php">
<MixedArgument occurrences="11">
<MixedArgument occurrences="10">
<code>$config['db'][1]['host']</code>
<code>$config['db'][1]['login']</code>
<code>$config['db'][1]['name']</code>
<code>$config['db'][1]['password']</code>
<code>$dir</code>
<code>$dir</code>
<code>$expire</code>
<code>$func($path)</code>
<code>$path</code>
<code>self::MIN_PHP_VERSION</code>
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"friendsofphp/php-cs-fixer": "3.2.1",
"friendsofredaxo/linter": "1.3.0",
"phpstan/extension-installer": "1.1.0",
"phpstan/phpstan": "0.12.99",
"phpstan/phpstan-deprecation-rules": "0.12.6",
"phpstan/phpstan-phpunit": "0.12.22",
"phpstan/phpstan-symfony": "0.12.44",
"phpstan/phpstan": "1.1.2",
"phpstan/phpstan-deprecation-rules": "1.0.0",
"phpstan/phpstan-phpunit": "1.0.0",
"phpstan/phpstan-symfony": "1.0.1",
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "0.16.1",
"psalm/plugin-symfony": "3.0.4",
"rector/rector": "0.11.60",
"rector/rector": "0.12.2",
"redaxo/php-cs-fixer-config": "1.0.0",
"redaxo/psalm-plugin": "1.0.0",
"vimeo/psalm": "4.11.2"
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/core/lib/setup/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public static function isEnabled(): bool
// invalidate expired tokens
$updated = false;
foreach ($setup as $token => $expire) {
if (strtotime($expire) < time()) {
if (strtotime((string) $expire) < time()) {
unset($setup[$token]);
$updated = true;
}
Expand Down

0 comments on commit 48a465d

Please sign in to comment.