Skip to content

Fixes regression in FilterChain options, allows callback to be an instance of FilterInterface again. #497

Fixes regression in FilterChain options, allows callback to be an instance of FilterInterface again.

Fixes regression in FilterChain options, allows callback to be an instance of FilterInterface again. #497

Triggered via pull request April 11, 2024 07:22
Status Failure
Total duration 1m 11s
Artifacts

continuous-integration.yml

on: pull_request
ci  /  Generate job matrix
11s
ci / Generate job matrix
Matrix: ci / QA Checks
Fit to window
Zoom out
Zoom in

Annotations

2 errors
InvalidReturnType: test/FilterChainTest.php#L115
test/FilterChainTest.php:115:17: InvalidReturnType: The declared return type 'array{callbacks?: list<array{callback: callable(mixed):mixed, priority?: int}>, filters?: list<array{name: string, options?: array<string, mixed>, priority?: int}>}' for LaminasTest\Filter\FilterChainTest::getChainConfig is incorrect, got 'array{callbacks: list{array{callback: list{LaminasTest\Filter\FilterChainTest::class, 'staticUcaseFilter'}}, array{callback: LaminasTest\Filter\TestAsset\StrRepeatFilterInterface}, array{callback: pure-Closure(string):string, priority: 10000}}, filters: list{array{name: Laminas\Filter\StripTags::class, options: array{allowAttribs: 'id', allowTags: 'img'}, priority: 10100}}}' (see https://psalm.dev/011)
InvalidReturnStatement: test/FilterChainTest.php#L118
test/FilterChainTest.php:118:16: InvalidReturnStatement: The inferred type 'array{callbacks: list{array{callback: list{LaminasTest\Filter\FilterChainTest::class, 'staticUcaseFilter'}}, array{callback: LaminasTest\Filter\TestAsset\StrRepeatFilterInterface}, array{callback: pure-Closure(string):string, priority: 10000}}, filters: list{array{name: Laminas\Filter\StripTags::class, options: array{allowAttribs: 'id', allowTags: 'img'}, priority: 10100}}}' does not match the declared return type 'array{callbacks?: list<array{callback: callable(mixed):mixed, priority?: int}>, filters?: list<array{name: string, options?: array<string, mixed>, priority?: int}>}' for LaminasTest\Filter\FilterChainTest::getChainConfig (see https://psalm.dev/128)