diff --git a/composer.json b/composer.json index d32bbdd..7d1d887 100644 --- a/composer.json +++ b/composer.json @@ -23,23 +23,27 @@ "require": { "php": ">=8.0", "ext-pdo": "*", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/var-dumper": "^5.0|^6.0", + "symfony/dependency-injection": "^5.0|^6.0|^7.0", + "symfony/http-kernel": "^5.0|^6.0|^7.0", + "symfony/var-dumper": "^5.0|^6.0|^7.0", "squirrelphp/queries": "^1.0", "jdorn/sql-formatter": "1.2.17" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", + "bamarni/composer-bin-plugin": "^1.8", "captainhook/plugin-composer": "^5.0", - "phpunit/phpunit": "^9.0", + "phpunit/phpunit": "^10.0", "twig/twig": "^3.0" }, "suggest": { "squirrelphp/entities-bundle": "Automatic integration of squirrelphp/entities in Symfony" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true, + "captainhook/plugin-composer": true + } }, "autoload": { "psr-4": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e69de29..8c8548a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Cannot cast object to string\\.$#" + count: 1 + path: src/Twig/SquirrelQueriesExtension.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 74b744b..c7b08e2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,14 @@ - - - - src - - - - - tests - - + + + + + tests + + + + + src + + diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 8cc038c..edaa394 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,20 +1,22 @@ - + - - $doctrineConnection->getConfiguration()->getSQLLogger() + $logger array private array $loggers = []; + + getSQLLogger + - + DebugStack::class - + DebugStack::class diff --git a/psalm.xml b/psalm.xml index 54dbf03..d5dd193 100644 --- a/psalm.xml +++ b/psalm.xml @@ -5,6 +5,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" > diff --git a/ruleset.xml b/ruleset.xml index 1a7d17d..87de55c 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -53,7 +53,7 @@ - + diff --git a/src/DataCollector/SquirrelDataCollector.php b/src/DataCollector/SquirrelDataCollector.php index b478c40..1090623 100644 --- a/src/DataCollector/SquirrelDataCollector.php +++ b/src/DataCollector/SquirrelDataCollector.php @@ -203,9 +203,7 @@ private function sanitizeQueries(string $connectionName, array $queries): array private function sanitizeQuery(string $connectionName, array $query): array { $query['explainable'] = true; - if ($query['params'] === null) { - $query['params'] = array(); - } + $query['params'] ??= array(); if (!\is_array($query['params'])) { $query['params'] = array($query['params']); } diff --git a/vendor-bin/phpcs/composer.json b/vendor-bin/phpcs/composer.json index ff825e2..ba2d2f4 100644 --- a/vendor-bin/phpcs/composer.json +++ b/vendor-bin/phpcs/composer.json @@ -1,6 +1,11 @@ { "require": { "squizlabs/php_codesniffer": "^3.5", - "slevomat/coding-standard": "^7.0" + "slevomat/coding-standard": "^8.0" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index dc50501..7927489 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,6 +1,6 @@ { "require": { - "vimeo/psalm": "^4.0", + "vimeo/psalm": "^5.0", "psalm/plugin-phpunit": "*", "psalm/plugin-mockery": "*" }