Преглед изворни кода

[DependencyInjection] made a small performance optimization

Fabien Potencier пре 14 година
родитељ
комит
be31bc091e
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2 4
      src/Symfony/Component/DependencyInjection/ContainerBuilder.php

+ 2 - 4
src/Symfony/Component/DependencyInjection/ContainerBuilder.php

@@ -623,10 +623,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
      */
     public function findDefinition($id)
     {
-        $id = strtolower($id);
-
-        if ($this->hasAlias($id)) {
-            return $this->findDefinition((string) $this->getAlias($id));
+        while ($this->hasAlias($id)) {
+            $id = (string) $this->getAlias($id);
         }
 
         return $this->getDefinition($id);