From 0141eb38c749781a7653fafbbb5e74237c2a01c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 10:35:06 +0000 Subject: [PATCH 1/2] chore(deps-dev): Bump phpstan/phpstan from 1.12.3 to 2.0.3 Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.12.3 to 2.0.3. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/2.0.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.12.3...2.0.3) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index d44e877..57fe9f0 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } }, "require-dev": { - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2.0", "vimeo/psalm": "^5.22", "phpunit/phpunit": "^10", "squizlabs/php_codesniffer": "^3.9", diff --git a/composer.lock b/composer.lock index 9bac331..d32312e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d4cf77ad775f8d0599754284fdef43a5", + "content-hash": "77bd2abd9b403e67a49da35bc500f91f", "packages": [ { "name": "archict/brick", @@ -2591,20 +2591,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0fcbf194ab63d8159bb70d9aa3e1350051632009" + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0fcbf194ab63d8159bb70d9aa3e1350051632009", - "reference": "0fcbf194ab63d8159bb70d9aa3e1350051632009", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -2645,7 +2645,7 @@ "type": "github" } ], - "time": "2024-09-09T08:10:35+00:00" + "time": "2024-11-28T22:19:37+00:00" }, { "name": "phpunit/php-code-coverage", From 6e27afceb22a2146bdcf867ab23b9b400b4fd586 Mon Sep 17 00:00:00 2001 From: Kevin Traini Date: Sat, 7 Dec 2024 11:39:03 +0100 Subject: [PATCH 2/2] fix: phpstan error Also add missing config key for psalm --- include/Router.php | 4 ++-- phpstan.neon | 3 +-- psalm.xml | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Router.php b/include/Router.php index 69ee392..899ade4 100644 --- a/include/Router.php +++ b/include/Router.php @@ -29,8 +29,8 @@ final class Router { private RouteCollection $route_collection; - private ?ResponseInterface $response; - private ?ServerRequestInterface $request; + private ?ResponseInterface $response = null; + private ?ServerRequestInterface $request = null; /** * @throws HTTPCodeNotHandledException diff --git a/phpstan.neon b/phpstan.neon index 607d135..dbb68aa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,5 +2,4 @@ parameters: level: 9 paths: - include - - tests - checkGenericClassInNonGenericObjectType: false \ No newline at end of file + - tests \ No newline at end of file diff --git a/psalm.xml b/psalm.xml index 6b4d490..d18f448 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,7 @@