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

Add support for ServiceManager 4 #64

Closed
InvisibleSmiley opened this issue Aug 12, 2024 · 0 comments · Fixed by #65
Closed

Add support for ServiceManager 4 #64

InvisibleSmiley opened this issue Aug 12, 2024 · 0 comments · Fixed by #65

Comments

@InvisibleSmiley
Copy link
Contributor

Right now this PHPStan extension is not compatible with Laminas ServiceManager v4 which was released on March 4 2024:
https://github.com/laminas/laminas-servicemanager/releases/tag/4.0.0

There's probably more to it than the obvious issue described below to support the new version, and AFAICS a breaking change cannot be avoided.

PHP Fatal error:  Declaration of LaminasPhpStan\UnmappedAliasServiceLocatorProxy::build($name, ?array $options = null)
must be compatible with Laminas\ServiceManager\ServiceLocatorInterface::build(string $name, ?array $options = null): mixed
in .../vendor/slam/phpstan-laminas-framework/src/UnmappedAliasServiceLocatorProxy.php on line 60

That method is an override for the sole purpose of throwing a ShouldNotHappenException but unfortunately this method needs to be implemented according to the requirements of the interface since there is no abstract/base class that can be used.

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

Successfully merging a pull request may close this issue.

1 participant