diff --git a/composer.json b/composer.json index 738d76e0d..1995efa7a 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "require-dev": { "phpunit/phpunit": "^11.4", "mockery/mockery": "^1.6.12", - "phpstan/phpstan": "^1.12.7" + "phpstan/phpstan": "^2.0.0" }, "prefer-stable": true, "minimum-stability": "dev", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2f9829313..3f1c227b4 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,9 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Variable \\$start might not be defined\\.$#" - count: 1 - path: src/mako/database/connections/Connection.php - message: "#^Call to an undefined method mako\\\\database\\\\midgard\\\\ResultSet\\:\\:including\\(\\)\\.$#" count: 1 @@ -20,10 +16,6 @@ parameters: message: "#Access to an undefined property mako\\\\error\\\\handlers\\\\web\\\\Handler::\\$response\\.#" count: 1 path: src/mako/http/traits/ContentNegotiationTrait.php - - - message: "#^Creating callable from a non-native method stdClass::(beforeAction|afterAction)()#" - count: 2 - path: src/mako/http/routing/Dispatcher.php - message: "#^PHPDoc tag @return with type mako\\\\utility\\\\Collection> is incompatible with native type static\\(mako\\\\utility\\\\Collection\\)\\.$#" count: 1 @@ -48,3 +40,7 @@ parameters: message: "#^Call to protected method orderMiddlewareByPriority\\(\\) of class mako\\\\http\\\\routing\\\\Dispatcher\\.$#" count: 1 path: src/mako/application/cli/commands/app/ListRoutes.php + - + message: "#^PHPDoc tag @var with type mako\\\\http\\\\routing\\\\Dispatcher is not subtype of native type \\$this\\(mako\\\\application\\\\cli\\\\commands\\\\app\\\\ListRoutes\\)\\.$#" + count: 1 + path: src/mako/application/cli/commands/app/ListRoutes.php diff --git a/src/mako/gatekeeper/adapters/Adapter.php b/src/mako/gatekeeper/adapters/Adapter.php index fc933d48e..7493ef768 100644 --- a/src/mako/gatekeeper/adapters/Adapter.php +++ b/src/mako/gatekeeper/adapters/Adapter.php @@ -19,8 +19,8 @@ /** * Base adapter. * - * @method mako\gatekeeper\repositories\group\GroupRepository getGroupRepository() - * @method mako\gatekeeper\repositories\user\UserRepository getUserRepository() + * @method \mako\gatekeeper\repositories\group\GroupRepository getGroupRepository() + * @method \mako\gatekeeper\repositories\user\UserRepository getUserRepository() */ abstract class Adapter implements AdapterInterface, WithGroupsInterface, WithLoginInterface { diff --git a/src/mako/gatekeeper/entities/group/Group.php b/src/mako/gatekeeper/entities/group/Group.php index 80c01a1dd..94c2042d8 100644 --- a/src/mako/gatekeeper/entities/group/Group.php +++ b/src/mako/gatekeeper/entities/group/Group.php @@ -18,8 +18,8 @@ * * @method int getId() * @property int $id - * @property \mako\utility\Time $created_at - * @property \mako\utility\Time $updated_at + * @property \mako\chrono\Time $created_at + * @property \mako\chrono\Time $updated_at * @property string $name * @property \mako\database\midgard\ResultSet $users */