2012-07-31 3 views
0

다음은 the tutorial입니다. 내가 명령을symfony2 오류, stty가 인식되지 않습니다.

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에 새로운 오전을 얻고있다.

+0

사용하는 Symfony2의 버전은 무엇? – Florent

+0

@Florent 2.0.16 –

답변

2

첫 번째 문제점은 DoctrineFixturesBundle의 올바른 네임 스페이스를 사용하지 않는다는 것입니다. 라이브러리 업데이트를 제안합니다.

경고 : 네임 스페이스는이 번들은 Symfony\Bundle 네임 스페이스에서 이전이었고, 지금은 Doctrine\Bundle 네임 스페이스로 이동

을 변경했습니다.

두 번째로 AppKernel 안에 DoctrineFixturesBundle을 선언해야합니다.

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

여기에서 자세한 정보를 찾을 수 있습니다 DoctrineFixturesBundles (안 최신!)