symfony2错误,stty无法识别

时间:2012-07-31 08:17:03

标签: symfony stty

我关注the tutorial。当我使用命令

php app/console doctrine:fixtures:load

然后我收到错误

C:\wamp\www\Symfony>php app/console doctrine:fixtures:load
'stty' is not recognized as an internal or external command,
operable program or batch file.

  [RuntimeException]

  The autoloader expected class "Symfony\Bundle\DoctrineFixturesBundle\DoctrineF
ixturesBundle" to be defined in file "C:\wamp\www\Symfony\app/../vendor/bundles\
Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle.php". The file was
found but the class was not in it, the class name or namespace probably has a ty
po.

我是symfony2的新手。

1 个答案:

答案 0 :(得分:2)

我注意到的第一个问题是你没有使用DoctrineFixturesBundle的正确名称空间。我建议你更新库。

  

警告:命名空间已更改

     

此捆绑包以前位于Symfony\Bundle命名空间下,现在已移至Doctrine\Bundle命名空间。

其次,您需要在DoctrineFixturesBundle内声明AppKernel

// ...
public function registerBundles()
{
    $bundles = array(
        // ...
        // Be carefull with the namespace!
        new \Doctrine\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
        // ...
    );
    // ...
}

您可以在此处找到更多信息:DoctrineFixturesBundles(不是最新的!)