Salut,

J'ai une erreur en faisant :
php app/console doctrine:fixtures:load

Fatal error: Class 'Doctrine\Common\DataFixtures\Loader' not found in /Users/spoofy/Sites/cyr/vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle/Common/DataFixtures/Loader.php on line 11
J'ai suivi la doc de symfony (http://symfony.com/doc/2.0/cookbook/..._fixtures.html) mais impossible de trouver d'où vient mon erreur.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
// in app/AppKernel.php
//...
public function registerBundles()
{
    $bundles = array(
//...
        new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
        new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
//...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
// in app/autoload.php
 
$loader->registerNamespaces(array(
'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
'Sensio' => __DIR__.'/../vendor/bundles',
'JMS' => __DIR__.'/../vendor/bundles',
'Doctrine\\Common\\Datafixtures' => __DIR__.'/../vendor/doctrine-fixtures/lib',
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
'Doctrine'  => __DIR__.'/../vendor/doctrine/lib',
//...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// in Cyr/Frontend/DefaultBundle/DataFixtures/ORM/LoadCityData.php
<?php
namespace Cyr\Frontend\DefaultBundle\DataFixtures\ORM;
 
use Doctrine\Common\DataFixtures\FixtureInterface;
use Cyr\Frontend\DefaultBundle\Entity\City;
 
class LoadCityData implements FixtureInterface
{
	public function load($manager)
	{
		// Bordeaux
		$city = new City();
		$city->setName('Bordeaux');
		$city->setRegion('South West');
		$city->setCountry('France');
		$city->setCityType(1);
		$manager->persist($city);
		$manager->flush();
	}
}
Une idée ?