Skip to content

Commit

Permalink
Merge branch '2.10.x' into 2.11.x
Browse files Browse the repository at this point in the history
* 2.10.x:
  Add errors caused by the lexer update to the baselines (#9360)
  • Loading branch information
derrabus committed Jan 12, 2022
2 parents e369cb6 + 1e972b6 commit e974313
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 20 deletions.
15 changes: 15 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,16 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:ArithmeticTerm\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticFactor\\|string\\.$#"
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:SimpleArithmeticExpression\\(\\) should return Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression but returns Doctrine\\\\ORM\\\\Query\\\\AST\\\\ArithmeticTerm\\|string\\.$#"
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: """
#^PHPDoc tag @return has invalid value \\(AST\\\\BetweenExpression\\|
Expand All @@ -980,6 +990,11 @@ parameters:
count: 1
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Parameter \\#1 \\$tokenType of method Doctrine\\\\ORM\\\\Query\\\\Parser\\:\\:isAggregateFunction\\(\\) expects 1\\|2\\|3\\|4\\|5\\|6\\|7\\|8\\|9\\|10\\|11\\|12\\|13\\|14\\|15\\|16\\|17\\|18\\|19\\|100\\|101\\|102\\|200\\|201\\|202\\|203\\|204\\|205\\|206\\|207\\|208\\|209\\|210\\|211\\|212\\|213\\|214\\|215\\|216\\|217\\|218\\|219\\|220\\|221\\|222\\|223\\|224\\|225\\|226\\|227\\|228\\|229\\|230\\|231\\|232\\|233\\|234\\|235\\|236\\|237\\|238\\|239\\|240\\|241\\|242\\|243\\|244\\|245\\|246\\|247\\|248\\|249\\|250\\|251\\|252\\|253\\|254\\|255\\|256, int\\|string\\|null given\\.$#"
count: 2
path: lib/Doctrine/ORM/Query/Parser.php

-
message: "#^Parameter \\#2 \\$stringPattern of class Doctrine\\\\ORM\\\\Query\\\\AST\\\\LikeExpression constructor expects Doctrine\\\\ORM\\\\Query\\\\AST\\\\InputParameter, Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node given\\.$#"
count: 1
Expand Down
48 changes: 28 additions & 20 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,7 @@
</RedundantCastGivenDocblockType>
</file>
<file src="lib/Doctrine/ORM/Mapping/ClassMetadata.php">
<PropertyNotSetInConstructor occurrences="6">
<code>ClassMetadata</code>
<PropertyNotSetInConstructor occurrences="5">
<code>ClassMetadata</code>
<code>ClassMetadata</code>
<code>ClassMetadata</code>
Expand Down Expand Up @@ -809,9 +808,8 @@
<code>$mapping['originalField']</code>
<code>$mapping['targetEntity']</code>
</PossiblyUndefinedArrayOffset>
<PropertyNotSetInConstructor occurrences="6">
<PropertyNotSetInConstructor occurrences="5">
<code>$idGenerator</code>
<code>$isVersioned</code>
<code>$namespace</code>
<code>$sequenceGeneratorDefinition</code>
<code>$table</code>
Expand Down Expand Up @@ -1604,10 +1602,6 @@
<MoreSpecificReturnType occurrences="1">
<code>executeInserts</code>
</MoreSpecificReturnType>
<RedundantConditionGivenDocblockType occurrences="2">
<code>$isVersioned</code>
<code>$isVersioned</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php">
<PossiblyUndefinedVariable occurrences="1">
Expand Down Expand Up @@ -1870,6 +1864,9 @@
<PossiblyNullArrayOffset occurrences="1">
<code>$class-&gt;associationMappings</code>
</PossiblyNullArrayOffset>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$parser-&gt;getLexer()-&gt;token['value']</code>
</PossiblyNullPropertyAssignmentValue>
<PropertyNotSetInConstructor occurrences="2">
<code>$fieldMapping</code>
<code>$pathExpression</code>
Expand Down Expand Up @@ -1951,6 +1948,9 @@
<code>$lexer-&gt;lookahead['value']</code>
<code>$lexer-&gt;token['value']</code>
</PossiblyNullArrayAccess>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$lexer-&gt;token['value']</code>
</PossiblyNullPropertyAssignmentValue>
<PropertyNotSetInConstructor occurrences="4">
<code>$both</code>
<code>$leading</code>
Expand Down Expand Up @@ -2328,11 +2328,21 @@
<code>call_user_func($functionClass, $functionName)</code>
<code>call_user_func($functionClass, $functionName)</code>
</DocblockTypeContradiction>
<InvalidNullableReturnType occurrences="1">
<InvalidArgument occurrences="1">
<code>$lookaheadType</code>
</InvalidArgument>
<InvalidNullableReturnType occurrences="6">
<code>SelectStatement|UpdateStatement|DeleteStatement</code>
<code>string</code>
<code>string</code>
<code>string</code>
<code>string</code>
<code>string</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="9">
<InvalidReturnStatement occurrences="11">
<code>$factors[0]</code>
<code>$primary</code>
<code>$terms[0]</code>
<code>$this-&gt;CollectionMemberExpression()</code>
<code>$this-&gt;ComparisonExpression()</code>
<code>$this-&gt;EmptyCollectionComparisonExpression()</code>
Expand All @@ -2342,9 +2352,11 @@
<code>$this-&gt;LikeExpression()</code>
<code>$this-&gt;NullComparisonExpression()</code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="2">
<InvalidReturnType occurrences="4">
<code>AST\BetweenExpression|</code>
<code>ArithmeticFactor</code>
<code>ArithmeticTerm</code>
<code>SimpleArithmeticExpression</code>
</InvalidReturnType>
<InvalidScalarArgument occurrences="3">
<code>$this-&gt;lexer-&gt;getLiteral($token)</code>
Expand Down Expand Up @@ -2382,15 +2394,14 @@
<code>$this-&gt;ConditionalExpression()</code>
<code>$this-&gt;ConditionalExpression()</code>
</PossiblyInvalidPropertyAssignmentValue>
<PossiblyNullArgument occurrences="23">
<PossiblyNullArgument occurrences="22">
<code>$aliasIdentVariable</code>
<code>$dql</code>
<code>$field</code>
<code>$fromClassName</code>
<code>$functionName</code>
<code>$functionName</code>
<code>$functionName</code>
<code>$lookaheadType</code>
<code>$resultVariable</code>
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
<code>$this-&gt;lexer-&gt;lookahead['value']</code>
Expand All @@ -2407,7 +2418,7 @@
<code>$token['value']</code>
<code>$token['value']</code>
</PossiblyNullArgument>
<PossiblyNullArrayAccess occurrences="75">
<PossiblyNullArrayAccess occurrences="74">
<code>$glimpse['type']</code>
<code>$glimpse['value']</code>
<code>$lookahead['type']</code>
Expand Down Expand Up @@ -2478,12 +2489,14 @@
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['type']</code>
<code>$token['value']</code>
<code>$token['value']</code>
<code>$token['value']</code>
<code>$token['value']</code>
</PossiblyNullArrayAccess>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$value</code>
</PossiblyNullPropertyAssignmentValue>
<PossiblyNullReference occurrences="1">
<code>getNumberOfRequiredParameters</code>
</PossiblyNullReference>
Expand Down Expand Up @@ -3119,11 +3132,6 @@
<code>configure</code>
</MissingReturnType>
</file>
<file src="lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php">
<DeprecatedClass occurrences="1">
<code>Versions::getVersion('doctrine/orm')</code>
</DeprecatedClass>
</file>
<file src="lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php">
<PossiblyNullArgument occurrences="2">
<code>$entity</code>
Expand Down

0 comments on commit e974313

Please sign in to comment.