-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
BugSomething isn't workingSomething isn't working
Description
Bug Report
| Q | A |
|---|---|
| Version(s) | 3.6.0 until latest |
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
| * @template InstanceType of RouteInterface | |
| * @extends AbstractPluginManager<InstanceType> |
How to reproduce
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).
laminas-router/src/RoutePluginManager.php
Line 41 in fceae29
| protected $instanceOf = RouteInterface::class; |
Expected behavior
- * @template InstanceType of RouteInterface
- * @extends AbstractPluginManager<InstanceType>
+ * @extends AbstractPluginManager<PluginInterface>
* @psalm-import-type ServiceManagerConfiguration from ServiceManager
*/
class RoutePluginManager extends AbstractPluginManagerReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working