From 58716a3b57fedfa81e380622bce8664b6c2ed67f Mon Sep 17 00:00:00 2001 From: Andreas Leathley Date: Fri, 1 Dec 2023 09:57:30 +0100 Subject: [PATCH] Allow Symfony 7 --- composer.json | 6 +++--- phpstan-baseline.neon | 17 ++++++++++++++++- phpunit.xml.dist | 29 +++++++++++++++-------------- psalm-baseline.xml | 21 +++++++++------------ psalm.xml | 2 ++ 5 files changed, 45 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 326e303..b0ace43 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ ], "require": { "php": ">=8.0", - "symfony/console": "^5.0|^6.0", - "symfony/finder": "^5.0|^6.0", + "symfony/console": "^5.0|^6.0|^7.0", + "symfony/finder": "^5.0|^6.0|^7.0", "squirrelphp/debug": "^2.0", "squirrelphp/queries": "^1.2", "squirrelphp/types": "^1.0" @@ -30,7 +30,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8", "captainhook/plugin-composer": "^5.0", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^10.0", "mockery/mockery": "^1.0" }, "suggest": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a344f0f..f5586c8 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -61,7 +61,7 @@ parameters: path: src/MultiRepositoryReadOnly.php - - message: "#^Method Squirrel\\\\Entities\\\\MultiRepositoryReadOnly\\:\\:fetchAllAndFlatten\\(\\) should return array\\ but returns array\\\\.$#" + message: "#^Method Squirrel\\\\Entities\\\\MultiRepositoryReadOnly\\:\\:fetchAllAndFlatten\\(\\) should return array\\ but returns array\\, mixed\\>\\.$#" count: 1 path: src/MultiRepositoryReadOnly.php @@ -125,6 +125,21 @@ parameters: count: 3 path: src/RepositoryReadOnly.php + - + message: "#^Parameter \\#1 \\$value of function floatval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/RepositoryReadOnly.php + + - + message: "#^Parameter \\#1 \\$value of function intval expects array\\|bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 2 + path: src/RepositoryReadOnly.php + + - + message: "#^Parameter \\#1 \\$value of function strval expects bool\\|float\\|int\\|resource\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/RepositoryReadOnly.php + - message: "#^Parameter \\#1 \\$where of method Squirrel\\\\Entities\\\\RepositoryReadOnly\\:\\:preprocessWhere\\(\\) expects array\\, mixed given\\.$#" count: 1 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8eb6b3e..67a1f9a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,16 +1,17 @@ - - - - src - - - src/Generate/PHPFilesInDirectoryGetContents.php - - - - - tests - - + + + + + tests + + + + + src + + + src/Generate/PHPFilesInDirectoryGetContents.php + + diff --git a/psalm-baseline.xml b/psalm-baseline.xml index d2f2798..525010e 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,35 +1,32 @@ - + - + \IteratorAggregate - + \Iterator - + $db $db - - $sanitizedOptions['query'] + + - + $sanitizedQuery $sanitizedQuery $sanitizedQuery - - $query['limit'] + + - - - diff --git a/psalm.xml b/psalm.xml index 01c2768..b9bedf4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -6,6 +6,8 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="psalm-baseline.xml" + findUnusedBaselineEntry="true" + findUnusedCode="false" >