Skip to content

RoutePluginManager has incorrect generic statements #56

@boesing

Description

@boesing

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

* @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).

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 AbstractPluginManager

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions