Skip to content

Commit

Permalink
PHPStan 1.10.28, Psalm 5.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Aug 9, 2023
1 parent 6b220e3 commit c588a3d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"doctrine/annotations": "^1.13 || ^2",
"doctrine/coding-standard": "^9.0.2 || ^12.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "~1.4.10 || 1.10.25",
"phpstan/phpstan": "~1.4.10 || 1.10.28",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"vimeo/psalm": "4.30.0 || 5.13.1"
"vimeo/psalm": "4.30.0 || 5.14.1"
},
"conflict": {
"doctrine/annotations": "<1.13 || >= 3.0"
Expand Down
5 changes: 4 additions & 1 deletion lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,10 @@ private function cacheToArray(SimpleXMLElement $cacheMapping): array
private function getCascadeMappings(SimpleXMLElement $cascadeElement): array
{
$cascades = [];
foreach ($cascadeElement->children() as $action) {
$children = $cascadeElement->children();
assert($children !== null);

foreach ($children as $action) {
// According to the JPA specifications, XML uses "cascade-persist"
// instead of "persist". Here, both variations
// are supported because YAML, Annotation and Attribute use "persist"
Expand Down
5 changes: 4 additions & 1 deletion lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class UnderscoreNamingStrategy implements NamingStrategy
/** @var int */
private $case;

/** @var string */
/**
* @var string
* @psalm-var non-empty-string
*/
private $pattern;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ private function recreateInnerSql(

/**
* @return string[][]
* @psalm-return array{0: list<string>, 1: list<string>}
* @psalm-return array{0: list<non-empty-string>, 1: list<string>}
*/
private function generateSqlAliasReplacements(): array
{
Expand Down
11 changes: 7 additions & 4 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
<files psalm-version="5.14.1@b9d355e0829c397b9b3b47d0c0ed042a8a70284d">
<file src="lib/Doctrine/ORM/AbstractQuery.php">
<DeprecatedClass>
<code>IterableResult</code>
Expand Down Expand Up @@ -964,9 +964,6 @@
<code><![CDATA[$joinColumnElement['options']->children()]]></code>
<code><![CDATA[$option->children()]]></code>
</PossiblyNullArgument>
<PossiblyNullIterator>
<code><![CDATA[$cascadeElement->children()]]></code>
</PossiblyNullIterator>
<TypeDoesNotContainType>
<code><![CDATA[$xmlRoot->getName() === 'embeddable']]></code>
<code><![CDATA[$xmlRoot->getName() === 'entity']]></code>
Expand Down Expand Up @@ -2464,6 +2461,12 @@
<code>$last</code>
<code><![CDATA[strrpos($metadata->name, '\\')]]></code>
</PossiblyFalseArgument>
<PossiblyInvalidArgument>
<code>$method</code>
</PossiblyInvalidArgument>
<PossiblyInvalidOperand>
<code><![CDATA[str_replace('"', '""', $fieldMapping['options']['comment'])]]></code>
</PossiblyInvalidOperand>
<PossiblyNullArgument>
<code>$variableType</code>
</PossiblyNullArgument>
Expand Down

0 comments on commit c588a3d

Please sign in to comment.