`@psalm-assert` error upstream due to `ValidatorChain`
internalsystemerror opened this issue · 1 comments
internalsystemerror commented
Bug Report
Q | A |
---|---|
Version(s) | >2.18.0 |
Summary
The following line introduces an error upstream:
laminas-validator/src/ValidatorChain.php
Line 83 in 9fa954d
Current behavior
Running psalm on laminas/laminas-form we get the error:
ERROR: InvalidDocblock - src/FormAbstractServiceFactory.php:144:58 - Variable $this is not an argument so cannot be asserted (see https://psalm.dev/008)
$inputFilterFactory->getDefaultValidatorChain()->setPluginManager($container->get('ValidatorManager'));
How to reproduce
Run static analysis as stated above.
Expected behavior
No error
internalsystemerror commented
I think this appears to be more of a bug in psalm than laminas-validator, as:
$validatorChain = $inputFilterFactory->getDefaultValidatorChain();
$validatorChain->setPluginManager($container->get('ValidatorManager'));
does not give the same error