-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I have few modules which do someting like this:
class Module
{
public function onBootstrap(MvcEvent $event): void
{
$config = $event->getApplication()->getServiceManager()->get('config');
// ....
}
}This code hangs phpstan for about 5 minutes. Calling $event->getApplication()->getServiceManager()->get('AnyService') works without any issues. Currently I am using a workaround:
use Interop\Container\ContainerInterface;
class Module
{
public function onBootstrap(MvcEvent $event): void
{
/** @var ContainerInterface $serviceManager */
$serviceManager = $event->getApplication()->getServiceManager();
$config = $serviceManager->get('config');
// ....
}
}Tested on:
PHP 8.0.15
PHPStan 1.4.10
PHPStan Laminas Framework 1.0.0
Metadata
Metadata
Assignees
Labels
No labels