浏览代码

Updating calls from Console\Application::addCommand() to Console\Application::add() after method name refactoring.

Ryan Weaver 14 年之前
父节点
当前提交
0c97335284
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Symfony/Component/HttpKernel/Bundle/Bundle.php
  2. 1 1
      src/Symfony/Component/HttpKernel/bootstrap.php

+ 1 - 1
src/Symfony/Component/HttpKernel/Bundle/Bundle.php

@@ -152,7 +152,7 @@ abstract class Bundle extends ContainerAware implements BundleInterface
         foreach ($finder as $file) {
             $r = new \ReflectionClass($prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php'));
             if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
-                $application->addCommand($r->newInstance());
+                $application->add($r->newInstance());
             }
         }
     }

+ 1 - 1
src/Symfony/Component/HttpKernel/bootstrap.php

@@ -47,7 +47,7 @@ abstract class Bundle extends ContainerAware implements BundleInterface {
         foreach ($finder as $file) {
             $r = new \ReflectionClass($prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php'));
             if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
-                $application->addCommand($r->newInstance()); } } }
+                $application->add($r->newInstance()); } } }
     protected function initReflection() {
         $tmp = dirname(str_replace('\\', '/', get_class($this)));
         $this->namespacePrefix = str_replace('/', '\\', dirname($tmp));