-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
While making extension, I often need some service definition in beforeCompile() method, e.g.:
- load all Commands to Symfony Console Application
- load all Fixtures to Alice
- load all SqlFilters to Doctrine Filter Manager
- load Filter Providers to Latte Engine
After making service name optional, this is the only place where it is still required.
Everywhere I need some definition, I have to use these 2 methods:
$containerBuilder = $this->getContainerBuilder();
$serviceName = $containerBuilder->getByType(Nette\Bridges\ApplicationLatte\ILatteFactory::class);
$serviceDefinition = $containerBuilder->getDefinition($serviceName);I would prefer having single method:
$serviceDefinition = $containerBuilder->getDefinitionByType(
Nette\Bridges\ApplicationLatte\ILatteFactory::class
);What do you think?
Metadata
Metadata
Assignees
Labels
No labels