Skip to content

Commit 2aa476b

Browse files
committed
Allow Symfony 7 & upgrade dependencies
1 parent aa88370 commit 2aa476b

File tree

9 files changed

+46
-28
lines changed

9 files changed

+46
-28
lines changed

composer.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,27 @@
2323
"require": {
2424
"php": ">=8.0",
2525
"ext-pdo": "*",
26-
"symfony/dependency-injection": "^5.0|^6.0",
27-
"symfony/http-kernel": "^5.0|^6.0",
28-
"symfony/var-dumper": "^5.0|^6.0",
26+
"symfony/dependency-injection": "^5.0|^6.0|^7.0",
27+
"symfony/http-kernel": "^5.0|^6.0|^7.0",
28+
"symfony/var-dumper": "^5.0|^6.0|^7.0",
2929
"squirrelphp/queries": "^1.0",
3030
"jdorn/sql-formatter": "1.2.17"
3131
},
3232
"require-dev": {
33-
"bamarni/composer-bin-plugin": "^1.3",
33+
"bamarni/composer-bin-plugin": "^1.8",
3434
"captainhook/plugin-composer": "^5.0",
35-
"phpunit/phpunit": "^9.0",
35+
"phpunit/phpunit": "^10.0",
3636
"twig/twig": "^3.0"
3737
},
3838
"suggest": {
3939
"squirrelphp/entities-bundle": "Automatic integration of squirrelphp/entities in Symfony"
4040
},
4141
"config": {
42-
"sort-packages": true
42+
"sort-packages": true,
43+
"allow-plugins": {
44+
"bamarni/composer-bin-plugin": true,
45+
"captainhook/plugin-composer": true
46+
}
4347
},
4448
"autoload": {
4549
"psr-4": {

phpstan-baseline.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Cannot cast object to string\\.$#"
5+
count: 1
6+
path: src/Twig/SquirrelQueriesExtension.php

phpunit.xml.dist

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
3-
<coverage>
4-
<include>
5-
<directory>src</directory>
6-
</include>
7-
</coverage>
8-
<testsuites>
9-
<testsuite name="Unit Tests">
10-
<directory>tests</directory>
11-
</testsuite>
12-
</testsuites>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
3+
<coverage includeUncoveredFiles="false"/>
4+
<testsuites>
5+
<testsuite name="Squirrel Test Suite">
6+
<directory>tests</directory>
7+
</testsuite>
8+
</testsuites>
9+
<source>
10+
<include>
11+
<directory>src</directory>
12+
</include>
13+
</source>
1314
</phpunit>

psalm-baseline.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.13.1@5cf660f63b548ccd4a56f62d916ee4d6028e01a3">
2+
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
33
<file src="src/DataCollector/SquirrelDataCollector.php">
4-
<DeprecatedClass occurrences="4">
5-
<code>$doctrineConnection-&gt;getConfiguration()-&gt;getSQLLogger()</code>
4+
<DeprecatedClass>
65
<code>$logger</code>
76
<code>array</code>
87
<code>private array $loggers = [];</code>
98
</DeprecatedClass>
9+
<DeprecatedMethod>
10+
<code>getSQLLogger</code>
11+
</DeprecatedMethod>
1012
</file>
1113
<file src="src/DependencyInjection/Compiler/LayersPass.php">
12-
<DeprecatedClass occurrences="1">
14+
<DeprecatedClass>
1315
<code>DebugStack::class</code>
1416
</DeprecatedClass>
1517
</file>
1618
<file src="tests/LayersPassTest.php">
17-
<DeprecatedClass occurrences="1">
19+
<DeprecatedClass>
1820
<code>DebugStack::class</code>
1921
</DeprecatedClass>
2022
</file>

psalm.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
xmlns="https://getpsalm.org/schema/config"
66
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
77
errorBaseline="psalm-baseline.xml"
8+
findUnusedBaselineEntry="true"
9+
findUnusedCode="false"
810
>
911
<projectFiles>
1012
<directory name="src" />

ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
5454
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
5555
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
56-
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing"/>
56+
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration"/>
5757
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
5858
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
5959
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>

src/DataCollector/SquirrelDataCollector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ private function sanitizeQueries(string $connectionName, array $queries): array
203203
private function sanitizeQuery(string $connectionName, array $query): array
204204
{
205205
$query['explainable'] = true;
206-
if ($query['params'] === null) {
207-
$query['params'] = array();
208-
}
206+
$query['params'] ??= array();
209207
if (!\is_array($query['params'])) {
210208
$query['params'] = array($query['params']);
211209
}

vendor-bin/phpcs/composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"require": {
33
"squizlabs/php_codesniffer": "^3.5",
4-
"slevomat/coding-standard": "^7.0"
4+
"slevomat/coding-standard": "^8.0"
5+
},
6+
"config": {
7+
"allow-plugins": {
8+
"dealerdirect/phpcodesniffer-composer-installer": true
9+
}
510
}
611
}

vendor-bin/psalm/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"vimeo/psalm": "^4.0",
3+
"vimeo/psalm": "^5.0",
44
"psalm/plugin-phpunit": "*",
55
"psalm/plugin-mockery": "*"
66
}

0 commit comments

Comments
 (0)