Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually support alternative containers interfaces for get() return types #38

Closed
InvisibleSmiley opened this issue Oct 21, 2022 · 1 comment

Comments

@InvisibleSmiley
Copy link
Contributor

When I worked on #27 I missed that the ServiceManagerGetDynamicReturnTypeExtension is actually restricted to ServiceLocatorInterface through getClass(), i.e. it does not support \Interop\Container\ContainerInterface or \Psr\Container\ContainerInterface. Hence, I wrongly updated the README.md documentation (first item under "This extension provides following features:"), too.

This feature request is to add support for letting this extension determine the return type of get() method calls on instances of either \Interop\Container\ContainerInterface or \Psr\Container\ContainerInterface, assuming that they are actually returning a ServiceManager instance.

Hopefully all that needs to be done here is to extract the implementation of ServiceManagerGetDynamicReturnTypeExtension to an abstract base class and then providing three subclasses (one per container type). Didn't check whether the class is covered by tests yet.

Please fix the README.md statement until this issue is resolved.

@InvisibleSmiley
Copy link
Contributor Author

In case you missed it: Created PR #39 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant