Skip to content

Commit ec31d14

Browse files
authored
Merge 5.x into 6.x
2 parents 0fd1ada + 6e99cbf commit ec31d14

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@
4848
"matthiasnoback/symfony-config-test": "^4.2 || ^5.0",
4949
"matthiasnoback/symfony-dependency-injection-test": "^4.1 || ^5.0",
5050
"phpstan/extension-installer": "^1.0",
51-
"phpstan/phpstan": "^1.0",
52-
"phpstan/phpstan-phpunit": "^1.0",
53-
"phpstan/phpstan-strict-rules": "^1.0",
54-
"phpstan/phpstan-symfony": "^1.0",
51+
"phpstan/phpstan": "^1.0 || ^2.0",
52+
"phpstan/phpstan-phpunit": "^1.0 || ^2.0",
53+
"phpstan/phpstan-strict-rules": "^1.0 || ^2.0",
54+
"phpstan/phpstan-symfony": "^1.0 || ^2.0",
5555
"phpunit/phpunit": "^9.5.13",
56-
"psalm/plugin-phpunit": "^0.18",
56+
"psalm/plugin-phpunit": "^0.18 || ^0.19",
5757
"psalm/plugin-symfony": "^5.0",
58-
"rector/rector": "^1.1",
58+
"rector/rector": "^1.1 || ^2.0",
5959
"symfony/browser-kit": "^6.4 || ^7.1",
6060
"symfony/error-handler": "^6.4 || ^7.1",
6161
"symfony/phpunit-bridge": "^6.4 || ^7.1",
6262
"symfony/stopwatch": "^6.4 || ^7.1",
63-
"vimeo/psalm": "^5.8"
63+
"vimeo/psalm": "^5.8 || ^6.10"
6464
},
6565
"conflict": {
6666
"knplabs/knp-menu-bundle": "<3.0"

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<!-- Psalm equivalent of PHPStan config `treatPhpDocTypesAsCertain: false` -->
1616
<DocblockTypeContradiction errorLevel="suppress"/>
1717
<RedundantConditionGivenDocblockType errorLevel="suppress"/>
18+
<MissingOverrideAttribute errorLevel="suppress"/>
1819
</issueHandlers>
1920
</psalm>

src/Templating/Helper/BlockHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
* css: string[],
3636
* }
3737
* }
38+
*
39+
* NEXT_MAJOR: Change this class to final.
40+
*
41+
* @final since 5.2.0
3842
*/
3943
class BlockHelper
4044
{

src/Util/RecursiveBlockIterator.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ public function __construct($array)
4040
*/
4141
public function getChildren(): self
4242
{
43-
return new self($this->current()->getChildren());
43+
$current = $this->current();
44+
\assert(null !== $current);
45+
46+
return new self($current->getChildren());
4447
}
4548

4649
public function hasChildren(): bool
4750
{
48-
return $this->current()->hasChild();
51+
$current = $this->current();
52+
\assert(null !== $current);
53+
54+
return $current->hasChild();
4955
}
5056
}

tests/Twig/Extension/BlockExtensionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function setUp(): void
4747
}
4848

4949
/**
50-
* @return iterable<array-key, array{string, array<mixed>, string}>
50+
* @return iterable<array-key, array{string, list<mixed>, string}>
5151
*/
5252
public static function provideFunctionCases(): iterable
5353
{
@@ -69,7 +69,7 @@ public static function provideFunctionCases(): iterable
6969
}
7070

7171
/**
72-
* @param mixed[] $args
72+
* @param list<mixed> $args
7373
*
7474
* @dataProvider provideFunctionCases
7575
*/
@@ -80,7 +80,7 @@ public function testFunction(string $name, array $args, string $expectedMethod):
8080
->with(...$args);
8181

8282
/** @psalm-suppress InternalMethod */
83-
$func = $this->env->getFunction($name);
83+
$func = $this->env->getFunction($name); // @phpstan-ignore method.internal
8484

8585
static::assertInstanceOf(TwigFunction::class, $func);
8686

0 commit comments

Comments
 (0)