Slamdunk / phpstan-laminas-framework

Laminas Framework 3 extensions for PHPStan
MIT License
16 stars 10 forks source link

Support alternative container interfaces #27

Closed InvisibleSmiley closed 2 years ago

InvisibleSmiley commented 2 years ago

First of all thanks for this, looks very promising. :-)

It seems that currently only \Laminas\ServiceManager\ServiceLocatorInterface is supported for get() and has().

I'd love to see support for other common container interfaces, too, especially \Psr\Container\ContainerInterface.

Looking at the source code I'm a little confused because it seems to be supported in one place but not the other:

Can you add such support please (configurable if need be)?

Slamdunk commented 2 years ago

Hi, can you create a PR for this please?

InvisibleSmiley commented 2 years ago

I'll see what I can do (for the non-configurable, always-active variant).