IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Symfony PHP Discussion :

PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found


Sujet :

Symfony PHP

  1. #1
    Nouveau membre du Club
    Inscrit en
    Novembre 2008
    Messages
    102
    Détails du profil
    Informations forums :
    Inscription : Novembre 2008
    Messages : 102
    Points : 34
    Points
    34
    Par défaut PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found
    Bonsoir, j'avais un problème de choix quant à la version du bunde à utiliser, J’ai finalement opté pour la version dev-master / 2.2.x-dev du Bundle doctrine/doctrine-fixtures-bundle. Et voici comment j’ai modifier le fichier composer.json. J’ai pris en compte toutes les dépendances qu’il proposait :

    {
    
      "require": {
    
                    "php": ">=5.3.3",
    
                    "doctrine/doctrine-fixtures-bundle": "2.2.*@dev",
    
                    "doctrine/doctrine-bundle": "~1.0",
    
                    "symfony/doctrine-bridge": "~2.1",
    
                    "doctrine/data-fixtures": "~1.0"
    
      }
    
    }
    Et quand j’ai lancé la commande de mise à jour, toutes les mises à jour ont été effectuées avec succès, comme le montre les résultats en dessous. Seulement il y est fait mention d’une erreur que je ne comprends pas, celle là:

    PHP Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle'

    not found in C:\wamp\www\Symfony\app\AppKernel.php on line 27
    Pourtant ce n’est pas vrai, j’ai déclaré la class dans le fichierAppKernel.php comme cela:

    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
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    class AppKernel extends Kernel
    
    {
    
        public function registerBundles()
    
        {
    
            $bundles = array(
    
                new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
    
                new Symfony\Bundle\SecurityBundle\SecurityBundle(),
    
                new Symfony\Bundle\TwigBundle\TwigBundle(),
    
                new Symfony\Bundle\MonologBundle\MonologBundle(),
    
                new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
    
                new Symfony\Bundle\AsseticBundle\AsseticBundle(),
    
                new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
    
                new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
    
                new Sdz\BlogBundle\SdzBlogBundle(),
    
            );
    
            if (in_array($this->getEnvironment(), array('dev', 'test'))) {
    
               // $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
    
                $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
    
                $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
    
                $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
    
                $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
    
            }
    
            return $bundles;
    
        }
    Les resultats du succès de la mise à jour des dépendances via composer
    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
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    C:\wamp\www\Symfony>php ../composer.phar update
    
    Loading composer repositories with package information
    
    Updating dependencies (including require-dev)
    
      - Removing twig/twig (v1.13.2)
    
      - Installing twig/twig (v1.14.0)
    
        Loading from cache
    
      - Installing doctrine/lexer (v1.0)
    
        Downloading: 100%
    
      - Installing doctrine/annotations (v1.1.2)
    
        Downloading: 100%
    
     
    
    Writing lock file
    
    Generating autoload files
    
    Updating the "app/config/parameters.yml" file.
    
    PHP Fatal error:  Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle'
    
    not found in C:\wamp\www\Symfony\app\AppKernel.php on line 27
    
    PHP Stack trace:
    
    PHP   1. {main}() C:\wamp\www\Symfony\app\console:0
    
    PHP   2. Symfony\Component\Console\Application->run() C:\wamp\www\Symfony\app\co
    
    nsole:27
    
    PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() C:\wamp\www
    
    \Symfony\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:12
    
    1
    
    PHP   4. Symfony\Component\HttpKernel\Kernel->boot() C:\wamp\www\Symfony\vendor\
    
    symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:70
    
    PHP   5. Symfony\Component\HttpKernel\Kernel->initializeBundles() C:\wamp\www\Sy
    
    mfony\app\bootstrap.php.cache:2215
    
    PHP   6. AppKernel->registerBundles() C:\wamp\www\Symfony\app\bootstrap.php.cach
    
    e:2385
    
    Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handl
    
    ing the post-update-cmd event terminated with an exception
    
      [RuntimeException]
    
      An error occurred when executing the ""cache:clear --no-warmup"" command.
    
    update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
    
     [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|v
    
    vv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
    
    C:\wamp\www\Symfony>

  2. #2
    Membre éclairé
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Août 2011
    Messages
    477
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Août 2011
    Messages : 477
    Points : 677
    Points
    677
    Par défaut
    Bonjour,

    Ce que dit l'erreur, c'est qu'il ne trouve pas le bundle.

    Le bundle, est il présent dans les vendors ?

    Essaye de supprimer le cache à la main.

  3. #3
    Membre régulier
    Homme Profil pro
    Inscrit en
    Février 2011
    Messages
    85
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 85
    Points : 77
    Points
    77
    Par défaut
    De plus, tu l'a ajouté ce bundle en mode dev.

    Es tu en mode dev lors de ton développement ?

Discussions similaires

  1. Réponses: 4
    Dernier message: 14/06/2013, 17h28
  2. [PEAR] Installation pear avec go-pear.php : Fatal error: Class 'PEAR' not found
    Par kaboume dans le forum Bibliothèques et frameworks
    Réponses: 0
    Dernier message: 23/07/2010, 11h54
  3. [1.x] Fatal error: Class 'PDO' not found
    Par phpiste dans le forum Symfony
    Réponses: 5
    Dernier message: 14/07/2010, 12h40
  4. Fatal error: Class SoapServer not found in
    Par l.laurent60 dans le forum XML/XSL et SOAP
    Réponses: 8
    Dernier message: 21/05/2009, 10h12
  5. [MySQL] Fatal error: Class 'mysqli' not found in site
    Par rashid120 dans le forum PHP & Base de données
    Réponses: 1
    Dernier message: 29/07/2008, 08h42

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo