[DI] Deduplicate resource while adding them
This commit is contained in:
parent
b3b3dac81b
commit
04853fc5c3
@ -202,7 +202,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
*/
|
||||
public function getResources()
|
||||
{
|
||||
return array_unique($this->resources);
|
||||
return array_values($this->resources);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -218,7 +218,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->resources[] = $resource;
|
||||
$this->resources[(string) $resource] = $resource;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user