diff --git a/src/DI/Container.php b/src/DI/Container.php index 7250f0d06..381a2b985 100644 --- a/src/DI/Container.php +++ b/src/DI/Container.php @@ -98,8 +98,10 @@ public function removeService($name) */ public function getService($name) { - $name = isset($this->meta[self::ALIASES][$name]) ? $this->meta[self::ALIASES][$name] : $name; if (!isset($this->registry[$name])) { + if (isset($this->meta[self::ALIASES][$name])) { + return $this->getService($this->meta[self::ALIASES][$name]); + } $this->registry[$name] = $this->createService($name); } return $this->registry[$name];