Skip to content

Commit 9647d0e

Browse files
authored
Merge release 2.16.1 into 2.17.x (#10896)
2 parents 368eb01 + 597a63a commit 9647d0e

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
"doctrine/annotations": "^1.13 || ^2",
4343
"doctrine/coding-standard": "^9.0.2 || ^12.0",
4444
"phpbench/phpbench": "^0.16.10 || ^1.0",
45-
"phpstan/phpstan": "~1.4.10 || 1.10.25",
45+
"phpstan/phpstan": "~1.4.10 || 1.10.28",
4646
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
4747
"psr/log": "^1 || ^2 || ^3",
4848
"squizlabs/php_codesniffer": "3.7.2",
4949
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
5050
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
5151
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
52-
"vimeo/psalm": "4.30.0 || 5.13.1"
52+
"vimeo/psalm": "4.30.0 || 5.14.1"
5353
},
5454
"conflict": {
5555
"doctrine/annotations": "<1.13 || >= 3.0"

lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,10 @@ private function cacheToArray(SimpleXMLElement $cacheMapping): array
944944
private function getCascadeMappings(SimpleXMLElement $cascadeElement): array
945945
{
946946
$cascades = [];
947-
foreach ($cascadeElement->children() as $action) {
947+
$children = $cascadeElement->children();
948+
assert($children !== null);
949+
950+
foreach ($children as $action) {
948951
// According to the JPA specifications, XML uses "cascade-persist"
949952
// instead of "persist". Here, both variations
950953
// are supported because YAML, Annotation and Attribute use "persist"

lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class UnderscoreNamingStrategy implements NamingStrategy
3030
/** @var int */
3131
private $case;
3232

33-
/** @var string */
33+
/**
34+
* @var string
35+
* @psalm-var non-empty-string
36+
*/
3437
private $pattern;
3538

3639
/**

lib/Doctrine/ORM/Tools/EntityGenerator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type,
13761376
$this->staticReflection[$metadata->name]['methods'][] = strtolower($methodName);
13771377

13781378
$var = sprintf('%sMethodTemplate', $type);
1379-
$template = static::$$var;
1379+
$template = (string) static::$$var;
13801380

13811381
$methodTypeHint = '';
13821382
$types = Type::getTypesMap();
@@ -1695,7 +1695,7 @@ protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, Cla
16951695
}
16961696

16971697
if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) {
1698-
$options[] = '"comment"="' . str_replace('"', '""', $fieldMapping['options']['comment']) . '"';
1698+
$options[] = '"comment"="' . str_replace('"', '""', (string) $fieldMapping['options']['comment']) . '"';
16991699
}
17001700

17011701
if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) {

lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ private function recreateInnerSql(
404404

405405
/**
406406
* @return string[][]
407-
* @psalm-return array{0: list<string>, 1: list<string>}
407+
* @psalm-return array{0: list<non-empty-string>, 1: list<string>}
408408
*/
409409
private function generateSqlAliasReplacements(): array
410410
{

psalm-baseline.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
2+
<files psalm-version="5.14.1@b9d355e0829c397b9b3b47d0c0ed042a8a70284d">
33
<file src="lib/Doctrine/ORM/AbstractQuery.php">
44
<DeprecatedClass>
55
<code>IterableResult</code>
@@ -964,9 +964,6 @@
964964
<code><![CDATA[$joinColumnElement['options']->children()]]></code>
965965
<code><![CDATA[$option->children()]]></code>
966966
</PossiblyNullArgument>
967-
<PossiblyNullIterator>
968-
<code><![CDATA[$cascadeElement->children()]]></code>
969-
</PossiblyNullIterator>
970967
<TypeDoesNotContainType>
971968
<code><![CDATA[$xmlRoot->getName() === 'embeddable']]></code>
972969
<code><![CDATA[$xmlRoot->getName() === 'entity']]></code>

0 commit comments

Comments
 (0)