[DI] fix overriding existing services with aliases for singly-implemented interfaces
This commit is contained in:
parent
4d11bca474
commit
739357656d
@ -121,7 +121,7 @@ abstract class FileLoader extends BaseFileLoader
|
||||
public function registerAliasesForSinglyImplementedInterfaces()
|
||||
{
|
||||
foreach ($this->interfaces as $interface) {
|
||||
if (!empty($this->singlyImplemented[$interface]) && !$this->container->hasAlias($interface)) {
|
||||
if (!empty($this->singlyImplemented[$interface]) && !$this->container->has($interface)) {
|
||||
$this->container->setAlias($interface, $this->singlyImplemented[$interface])->setPublic(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user