Skip to content

Commit

Permalink
Allow Symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
iquito committed Dec 1, 2023
1 parent 3e53944 commit 58716a3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 30 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
],
"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"
},
"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": {
Expand Down
17 changes: 16 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ parameters:
path: src/MultiRepositoryReadOnly.php

-
message: "#^Method Squirrel\\\\Entities\\\\MultiRepositoryReadOnly\\:\\:fetchAllAndFlatten\\(\\) should return array\\<bool\\|float\\|int\\|string\\|null\\> but returns array\\<int, mixed\\>\\.$#"
message: "#^Method Squirrel\\\\Entities\\\\MultiRepositoryReadOnly\\:\\:fetchAllAndFlatten\\(\\) should return array\\<bool\\|float\\|int\\|string\\|null\\> but returns array\\<int\\<0, max\\>, mixed\\>\\.$#"
count: 1
path: src/MultiRepositoryReadOnly.php

Expand Down Expand Up @@ -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\\<int\\|string, mixed\\>, mixed given\\.$#"
count: 1
Expand Down
29 changes: 15 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory>src/Generate/PHPFilesInDirectoryGetContents.php</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Unit Tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<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">
<coverage includeUncoveredFiles="false"/>
<testsuites>
<testsuite name="Squirrel Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
<exclude>
<file>src/Generate/PHPFilesInDirectoryGetContents.php</file>
</exclude>
</source>
</phpunit>
21 changes: 9 additions & 12 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.2.0@fb685a16df3050d4c18d8a4100fe83abe6458cba">
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<file src="src/Builder/SelectEntries.php">
<MissingTemplateParam occurrences="1">
<MissingTemplateParam>
<code>\IteratorAggregate</code>
</MissingTemplateParam>
</file>
<file src="src/Builder/SelectIterator.php">
<MissingTemplateParam occurrences="1">
<MissingTemplateParam>
<code>\Iterator</code>
</MissingTemplateParam>
</file>
<file src="src/MultiRepositoryReadOnly.php">
<MissingConstructor occurrences="2">
<MissingConstructor>
<code>$db</code>
<code>$db</code>
</MissingConstructor>
<PossiblyInvalidArgument occurrences="1">
<code>$sanitizedOptions['query']</code>
<PossiblyInvalidArgument>
<code><![CDATA[$sanitizedOptions['query']]]></code>
</PossiblyInvalidArgument>
</file>
<file src="src/RepositoryReadOnly.php">
<ArgumentTypeCoercion occurrences="3">
<ArgumentTypeCoercion>
<code>$sanitizedQuery</code>
<code>$sanitizedQuery</code>
<code>$sanitizedQuery</code>
</ArgumentTypeCoercion>
<InvalidArrayOffset occurrences="1">
<code>$query['limit']</code>
<InvalidArrayOffset>
<code><![CDATA[$query['limit']]]></code>
</InvalidArrayOffset>
</file>
<file src="tests/MultiRepositoryReadOnlyTest.php">
<ArgumentTypeCoercion occurrences="1"/>
</file>
</files>
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<projectFiles>
<directory name="src" />
Expand Down

0 comments on commit 58716a3

Please sign in to comment.