Skip to content

Commit 43f67c6

Browse files
committed
Merge branch '2.11.x' into 2.12.x
* 2.11.x: Psalm 4.19.0, PHPStan 1.4.3 (doctrine#9438) Ignore PHPUnit result cache everywhere (doctrine#9425)
2 parents f5be418 + d5c69fb commit 43f67c6

File tree

5 files changed

+64
-25
lines changed

5 files changed

+64
-25
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ vendor/
1515
/tests/Doctrine/Performance/history.db
1616
/.phpcs-cache
1717
composer.lock
18-
/.phpunit.result.cache
18+
.phpunit.result.cache
1919
/*.phpunit.xml

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
"doctrine/annotations": "^1.13",
4444
"doctrine/coding-standard": "^9.0",
4545
"phpbench/phpbench": "^0.16.10 || ^1.0",
46-
"phpstan/phpstan": "1.4.1",
46+
"phpstan/phpstan": "1.4.3",
4747
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
4848
"psr/log": "^1 || ^2 || ^3",
4949
"squizlabs/php_codesniffer": "3.6.2",
5050
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
5151
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
52-
"vimeo/psalm": "4.18.1"
52+
"vimeo/psalm": "4.19.0"
5353
},
5454
"conflict": {
5555
"doctrine/annotations": "<1.13 || >= 2.0"

lib/Doctrine/ORM/PersistentCollection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ public function offsetExists($offset): bool
481481
/**
482482
* {@inheritdoc}
483483
*/
484+
#[ReturnTypeWillChange]
484485
public function offsetGet($offset)
485486
{
486487
return $this->get($offset);

psalm-baseline.xml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.18.1@dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb">
2+
<files psalm-version="4.19.0@a2ad69ae4f5ab1f7d225a8dc4e2ec2d9415ed599">
33
<file src="lib/Doctrine/ORM/AbstractQuery.php">
44
<DeprecatedClass occurrences="1">
55
<code>IterableResult</code>
@@ -508,6 +508,12 @@
508508
<code>$entity</code>
509509
</PossiblyNullArgument>
510510
</file>
511+
<file src="lib/Doctrine/ORM/Id/SequenceGenerator.php">
512+
<MethodSignatureMustProvideReturnType occurrences="2">
513+
<code>serialize</code>
514+
<code>unserialize</code>
515+
</MethodSignatureMustProvideReturnType>
516+
</file>
511517
<file src="lib/Doctrine/ORM/Id/TableGenerator.php">
512518
<PossiblyFalseOperand occurrences="3">
513519
<code>$currentLevel</code>
@@ -737,6 +743,9 @@
737743
<code>$className</code>
738744
<code>$this-&gt;namespace . '\\' . $className</code>
739745
</LessSpecificReturnStatement>
746+
<MethodSignatureMustProvideReturnType occurrences="1">
747+
<code>__toString</code>
748+
</MethodSignatureMustProvideReturnType>
740749
<MissingClosureParamType occurrences="2">
741750
<code>$joinColumn</code>
742751
<code>$joinColumn</code>
@@ -2038,6 +2047,9 @@
20382047
<DocblockTypeContradiction occurrences="1">
20392048
<code>is_array($obj)</code>
20402049
</DocblockTypeContradiction>
2050+
<MethodSignatureMustProvideReturnType occurrences="1">
2051+
<code>__toString</code>
2052+
</MethodSignatureMustProvideReturnType>
20412053
<RedundantConditionGivenDocblockType occurrences="1">
20422054
<code>is_object($obj)</code>
20432055
</RedundantConditionGivenDocblockType>
@@ -2231,22 +2243,46 @@
22312243
<ArgumentTypeCoercion occurrences="1">
22322244
<code>$this-&gt;parts</code>
22332245
</ArgumentTypeCoercion>
2246+
<MethodSignatureMustProvideReturnType occurrences="1">
2247+
<code>__toString</code>
2248+
</MethodSignatureMustProvideReturnType>
22342249
<PossiblyInvalidCast occurrences="1">
22352250
<code>$this-&gt;parts[0]</code>
22362251
</PossiblyInvalidCast>
22372252
</file>
2253+
<file src="lib/Doctrine/ORM/Query/Expr/Comparison.php">
2254+
<MethodSignatureMustProvideReturnType occurrences="1">
2255+
<code>__toString</code>
2256+
</MethodSignatureMustProvideReturnType>
2257+
</file>
22382258
<file src="lib/Doctrine/ORM/Query/Expr/Composite.php">
2259+
<MethodSignatureMustProvideReturnType occurrences="1">
2260+
<code>__toString</code>
2261+
</MethodSignatureMustProvideReturnType>
22392262
<PossiblyInvalidCast occurrences="2">
22402263
<code>$part</code>
22412264
<code>$this-&gt;parts[0]</code>
22422265
</PossiblyInvalidCast>
22432266
</file>
2267+
<file src="lib/Doctrine/ORM/Query/Expr/From.php">
2268+
<MethodSignatureMustProvideReturnType occurrences="1">
2269+
<code>__toString</code>
2270+
</MethodSignatureMustProvideReturnType>
2271+
</file>
2272+
<file src="lib/Doctrine/ORM/Query/Expr/Func.php">
2273+
<MethodSignatureMustProvideReturnType occurrences="1">
2274+
<code>__toString</code>
2275+
</MethodSignatureMustProvideReturnType>
2276+
</file>
22442277
<file src="lib/Doctrine/ORM/Query/Expr/GroupBy.php">
22452278
<NonInvariantDocblockPropertyType occurrences="1">
22462279
<code>$parts</code>
22472280
</NonInvariantDocblockPropertyType>
22482281
</file>
22492282
<file src="lib/Doctrine/ORM/Query/Expr/Join.php">
2283+
<MethodSignatureMustProvideReturnType occurrences="1">
2284+
<code>__toString</code>
2285+
</MethodSignatureMustProvideReturnType>
22502286
<PossiblyNullArgument occurrences="1">
22512287
<code>$this-&gt;conditionType</code>
22522288
</PossiblyNullArgument>
@@ -2256,6 +2292,16 @@
22562292
<code>$parts</code>
22572293
</NonInvariantDocblockPropertyType>
22582294
</file>
2295+
<file src="lib/Doctrine/ORM/Query/Expr/Math.php">
2296+
<MethodSignatureMustProvideReturnType occurrences="1">
2297+
<code>__toString</code>
2298+
</MethodSignatureMustProvideReturnType>
2299+
</file>
2300+
<file src="lib/Doctrine/ORM/Query/Expr/OrderBy.php">
2301+
<MethodSignatureMustProvideReturnType occurrences="1">
2302+
<code>__toString</code>
2303+
</MethodSignatureMustProvideReturnType>
2304+
</file>
22592305
<file src="lib/Doctrine/ORM/Query/Expr/Orx.php">
22602306
<NonInvariantDocblockPropertyType occurrences="2">
22612307
<code>$allowedClasses</code>
@@ -2269,6 +2315,9 @@
22692315
</NonInvariantDocblockPropertyType>
22702316
</file>
22712317
<file src="lib/Doctrine/ORM/Query/Filter/SQLFilter.php">
2318+
<MethodSignatureMustProvideReturnType occurrences="1">
2319+
<code>__toString</code>
2320+
</MethodSignatureMustProvideReturnType>
22722321
<MissingClosureParamType occurrences="1">
22732322
<code>$value</code>
22742323
</MissingClosureParamType>
@@ -2503,9 +2552,9 @@
25032552
</PropertyNotSetInConstructor>
25042553
</file>
25052554
<file src="lib/Doctrine/ORM/Query/QueryExpressionVisitor.php">
2506-
<RedundantCondition occurrences="1">
2555+
<RedundantConditionGivenDocblockType occurrences="1">
25072556
<code>Comparison::EQ</code>
2508-
</RedundantCondition>
2557+
</RedundantConditionGivenDocblockType>
25092558
</file>
25102559
<file src="lib/Doctrine/ORM/Query/ResultSetMapping.php">
25112560
<PropertyTypeCoercion occurrences="3">
@@ -2522,6 +2571,9 @@
25222571
<code>$renameMode</code>
25232572
<code>$renameMode</code>
25242573
</ArgumentTypeCoercion>
2574+
<MethodSignatureMustProvideReturnType occurrences="1">
2575+
<code>__toString</code>
2576+
</MethodSignatureMustProvideReturnType>
25252577
<PossiblyNullPropertyFetch occurrences="1">
25262578
<code>$classMetadata-&gt;reflClass-&gt;name</code>
25272579
</PossiblyNullPropertyFetch>
@@ -2899,6 +2951,9 @@
28992951
<InvalidScalarArgument occurrences="1">
29002952
<code>$key</code>
29012953
</InvalidScalarArgument>
2954+
<MethodSignatureMustProvideReturnType occurrences="1">
2955+
<code>__toString</code>
2956+
</MethodSignatureMustProvideReturnType>
29022957
<PossiblyFalseArgument occurrences="2">
29032958
<code>$spacePos</code>
29042959
<code>$spacePos</code>
@@ -3232,8 +3287,9 @@
32323287
</RedundantConditionGivenDocblockType>
32333288
</file>
32343289
<file src="lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php">
3235-
<ArgumentTypeCoercion occurrences="1">
3290+
<ArgumentTypeCoercion occurrences="2">
32363291
<code>$metadata-&gt;changeTrackingPolicy</code>
3292+
<code>$simpleXml-&gt;asXML()</code>
32373293
</ArgumentTypeCoercion>
32383294
<DeprecatedClass occurrences="1">
32393295
<code>AbstractExporter</code>

psalm.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,6 @@
9595
<file name="lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php"/>
9696
</errorLevel>
9797
</MissingDependency>
98-
<NoInterfaceProperties>
99-
<errorLevel type="suppress">
100-
<!-- see https://github.com/vimeo/psalm/issues/7364 -->
101-
<referencedClass name="BackedEnum"/>
102-
</errorLevel>
103-
</NoInterfaceProperties>
104-
<ParadoxicalCondition>
105-
<errorLevel type="suppress">
106-
<!-- See https://github.com/vimeo/psalm/issues/3381 -->
107-
<file name="lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php"/>
108-
</errorLevel>
109-
</ParadoxicalCondition>
110-
<NullArgument>
111-
<errorLevel type="suppress">
112-
<!-- See https://github.com/vimeo/psalm/issues/5920 -->
113-
<file name="lib/Doctrine/ORM/Mapping/Driver/AttributeReader.php"/>
114-
</errorLevel>
115-
</NullArgument>
11698
<RedundantCastGivenDocblockType>
11799
<errorLevel type="suppress">
118100
<!-- Can be removed once the "getMaxResults" methods of those classes have native parameter types -->

0 commit comments

Comments
 (0)