Skip to content

Commit c32383d

Browse files
[DI] fix overriding existing services with aliases for singly-implemented interfaces
1 parent afd7f3b commit c32383d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loader/FileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function registerClasses(Definition $prototype, $namespace, $resource, $e
121121
public function registerAliasesForSinglyImplementedInterfaces()
122122
{
123123
foreach ($this->interfaces as $interface) {
124-
if (!empty($this->singlyImplemented[$interface]) && !$this->container->hasAlias($interface)) {
124+
if (!empty($this->singlyImplemented[$interface]) && !$this->container->has($interface)) {
125125
$this->container->setAlias($interface, $this->singlyImplemented[$interface])->setPublic(false);
126126
}
127127
}

0 commit comments

Comments
 (0)