Skip to content

Commit

Permalink
Upgrade PHPStan to v2.0 (#1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Nov 11, 2024
1 parent 9998be7 commit a508aba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"ergebnis/phpunit-slow-test-detector": "^2.9",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.3",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^9.5.25 || ^10.0 || ^11.0"
},
"conflict": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ parameters:
-
path: 'src/Reference.php'
identifier: argument.type
message: '~^Parameter #1 \$key of method Atk4\\Data\\Reference\\WeakAnalysingMap<array<int, mixed>,Closure,Atk4\\Data\\Model\|Atk4\\Data\\Persistence>::(get|set)\(\) expects list<mixed>, array\{0: Atk4\\Data\\Reference\\WeakAnalysingMap<list<mixed>, Closure, Atk4\\Data\\Model\|Atk4\\Data\\Persistence>, 1: non-falsy-string, 2: class-string<object>\|null, 3\?: object\|null, 4\?: non-empty-array\} given\.$~'
message: '~^Parameter #1 \$key of method Atk4\\Data\\Reference\\WeakAnalysingMap<list<mixed>,Closure,Atk4\\Data\\Model\|Atk4\\Data\\Persistence>::(get|set)\(\) expects list<mixed>, array\{0: Atk4\\Data\\Reference\\WeakAnalysingMap<list<mixed>, Closure, Atk4\\Data\\Model\|Atk4\\Data\\Persistence>, 1: non-falsy-string, 2: class-string<object>\|null, 3\?: object\|null, 4\?: non-empty-array\} given\.$~'
count: 2

# fix https://github.com/phpstan/phpstan-deprecation-rules/issues/52 and https://github.com/phpstan/phpstan/issues/6444
Expand Down
2 changes: 1 addition & 1 deletion src/Model/UserAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class UserAction
/** @var array<string, array<string, mixed>|Model> Argument definition. */
public $args = [];

/** @var array<int, string>|bool Specify which fields may be dirty when invoking action. APPLIES_TO_NO_RECORDS|APPLIES_TO_SINGLE_RECORD scopes for adding/modifying */
/** @var list<string>|bool Specify which fields may be dirty when invoking action. APPLIES_TO_NO_RECORDS|APPLIES_TO_SINGLE_RECORD scopes for adding/modifying */
public $fields = [];

/** @var bool Atomic action will automatically begin transaction before and commit it after completing. */
Expand Down

0 comments on commit a508aba

Please sign in to comment.