You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RoutePluginManager is a plugin manager implementations.
Plugin manager implementations have to provide their generic type instead of passing it to someone else.
Just consume the route plugin manager via service manager and then use either get or build method.
Psalm is only able to infer mixed|object instead of RouteInterface (which is the instance the plugin manager provides).
Service manager does not provide generics on class Level. So these cant be wrong. only plugin managers have class-level generics as these are limited to specific class implementations via instanceOf property.
This has been further improved in v4 of servicemanager via "SingleInstancePluginManager" abstraction.
might just be Inputfilter having invalid generics as well.
Bug Report
Summary
The
RoutePluginManager
is a plugin manager implementations.Plugin manager implementations have to provide their generic type instead of passing it to someone else.
Current behavior
laminas-router/src/RoutePluginManager.php
Lines 30 to 31 in fceae29
How to reproduce
Just consume the route plugin manager via service manager and then use either
get
orbuild
method.Psalm is only able to infer
mixed|object
instead ofRouteInterface
(which is the instance the plugin manager provides).laminas-router/src/RoutePluginManager.php
Line 41 in fceae29
Expected behavior
The text was updated successfully, but these errors were encountered: