diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 012919109..4758ec739 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $closingBracket @@ -206,7 +206,6 @@ $attributes[$itemKey] $href $index - $item autoEscape ? $this->escapeAttribute($attributes[$itemKey]) : $attributes[$itemKey]]]> autoEscape ? $this->escapeAttribute($value) : $value]]> $value @@ -404,6 +403,9 @@ $options + + $content + @@ -1319,7 +1321,6 @@ get('EventManager')]]> get('MvcTranslator')]]> get('Translator')]]> - get(TranslatorInterface::class)]]> $container @@ -1328,16 +1329,6 @@ ($name is class-string ? T : HelperInterface|callable) - - get - get - get - get - has - has - has - has - parent::get($name, $options) @@ -1556,7 +1547,6 @@ $variables - __file]]> $values diff --git a/psalm.xml.dist b/psalm.xml.dist index 0c6f02ed4..432aaaa1f 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -5,6 +5,8 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="psalm-baseline.xml" + findUnusedBaselineEntry="true" + findUnusedPsalmSuppress="true" > diff --git a/src/Helper/Url.php b/src/Helper/Url.php index ed8014233..5e40aac5c 100644 --- a/src/Helper/Url.php +++ b/src/Helper/Url.php @@ -111,7 +111,7 @@ public function __invoke($name = null, $params = [], $options = [], $reuseMatche * @param RouteStackInterface $router * @return Url * @throws Exception\InvalidArgumentException For invalid router types. - * @psalm-suppress RedundantConditionGivenDocblockType, DocblockTypeContradiction + * @psalm-suppress DocblockTypeContradiction */ public function setRouter($router) { @@ -133,7 +133,6 @@ public function setRouter($router) * * @param RouteMatch $routeMatch * @return Url - * @psalm-suppress RedundantConditionGivenDocblockType, DocblockTypeContradiction */ public function setRouteMatch($routeMatch) { diff --git a/test/Resolver/TemplatePathStackTest.php b/test/Resolver/TemplatePathStackTest.php index 14b152009..6bf781a93 100644 --- a/test/Resolver/TemplatePathStackTest.php +++ b/test/Resolver/TemplatePathStackTest.php @@ -108,7 +108,6 @@ public function testMayDisableLfiProtection(): void public function testStreamWrapperDisabledByDefault(): void { - /** @psalm-suppress DeprecatedMethod */ $this->assertFalse($this->stack->useStreamWrapper()); } @@ -118,9 +117,7 @@ public function testMayEnableStreamWrapper(): void if (! $flag) { $this->markTestSkipped('Short tags are disabled; cannot test'); } - /** @psalm-suppress DeprecatedMethod */ $this->stack->setUseStreamWrapper(true); - /** @psalm-suppress DeprecatedMethod */ $this->assertTrue($this->stack->useStreamWrapper()); } @@ -169,7 +166,6 @@ public function testReturnsPathWithStreamProtocolWhenStreamWrapperEnabled(): voi if (! $flag) { $this->markTestSkipped('Short tags are disabled; cannot test'); } - /** @psalm-suppress DeprecatedMethod */ $this->stack->setUseStreamWrapper(true) ->addPath($this->baseDir . '/_templates'); $expected = 'laminas.view://' . realpath($this->baseDir . '/_templates/test.phtml'); @@ -226,7 +222,6 @@ public function testAllowsSettingOptions($options): void $this->assertFalse($this->stack->isLfiProtectionOn()); $expected = (bool) ini_get('short_open_tag'); - /** @psalm-suppress DeprecatedMethod */ $this->assertSame($expected, $this->stack->useStreamWrapper()); $this->assertSame($options['default_suffix'] ?? null, $this->stack->getDefaultSuffix()); @@ -245,7 +240,6 @@ public function testAllowsPassingOptionsToConstructor($options): void $this->assertFalse($stack->isLfiProtectionOn()); $expected = (bool) ini_get('short_open_tag'); - /** @psalm-suppress DeprecatedMethod */ $this->assertSame($expected, $stack->useStreamWrapper()); $this->assertEquals(array_reverse($this->paths), $stack->getPaths()->toArray());