Skip to content

Commit

Permalink
Upgrade psalm to the latest version (#1858)
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-rafalko committed May 15, 2023
1 parent b65f59b commit 5104437
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PHPSTAN=./vendor/bin/phpstan
RECTOR=./vendor/bin/rector

PSALM=./.tools/psalm
PSALM_URL="https://github.com/vimeo/psalm/releases/download/v4.15.0/psalm.phar"
PSALM_URL="https://github.com/vimeo/psalm/releases/download/5.11.0/psalm.phar"

PHPUNIT=vendor/phpunit/phpunit/phpunit
PARATEST=vendor/bin/paratest
Expand Down
34 changes: 19 additions & 15 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.x-dev@">
<files psalm-version="5.11.0@c9b192ab8400fdaf04b2b13d110575adc879aa90">
<file src="src/Mutator/Extensions/BCMath.php">
<ImpureFunctionCall>
<code><![CDATA[$this->converters[$name->toLowerString()]($node)]]></code>
</ImpureFunctionCall>
</file>
<file src="src/Mutator/Extensions/MBString.php">
<ImpureFunctionCall>
<code><![CDATA[$this->converters[$name->toLowerString()]($node)]]></code>
</ImpureFunctionCall>
</file>
<file src="src/Mutator/IgnoreMutator.php">
<InvalidArgument occurrences="1">
<InvalidArgument>
<code>$node</code>
</InvalidArgument>
</file>
<file src="src/Mutator/Util/AbstractAllSubExprNegation.php">
<UndefinedPropertyFetch occurrences="2">
<code>$node-&gt;left</code>
<code>$node-&gt;right</code>
</UndefinedPropertyFetch>
</file>
<file src="src/TestFramework/Coverage/JUnit/JUnitTestFileDataProvider.php">
<InvalidReturnType occurrences="1">
<code>iterable&lt;string, string&gt;</code>
<InvalidReturnType>
<code><![CDATA[iterable<string, string>]]></code>
</InvalidReturnType>
</file>
<file src="src/TestFramework/Factory.php">
<InvalidArgument occurrences="1">
<code>$this-&gt;sourceFileFilter-&gt;filter($this-&gt;infectionConfig-&gt;getSourceFiles())</code>
<InvalidArgument>
<code><![CDATA[$this->sourceFileFilter->filter($this->infectionConfig->getSourceFiles())]]></code>
</InvalidArgument>
</file>
<file src="src/TestFramework/TestFrameworkExtraOptionsFilter.php">
<InvalidReturnStatement occurrences="1">
<code>preg_replace('/\s+/', ' ', trim($actualExtraOptions))</code>
<InvalidReturnStatement>
<code><![CDATA[preg_replace('/\s+/', ' ', trim($actualExtraOptions))]]></code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="1">
<InvalidReturnType>
<code>string</code>
</InvalidReturnType>
</file>
Expand Down
8 changes: 8 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 Expand Up @@ -39,5 +41,11 @@
<file name="src/FileSystem/DummySymfony6FileSystem.php"/>
</errorLevel>
</MethodSignatureMismatch>

<UnusedConstructor>
<errorLevel type="suppress">
<file name="src/CannotBeInstantiated.php" />
</errorLevel>
</UnusedConstructor>
</issueHandlers>
</psalm>

0 comments on commit 5104437

Please sign in to comment.