Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
3081 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found

n°2206007
coolpythea​s
l'union fait la force
Posté le 09-10-2013 à 06:47:35  profilanswer
 

Bonsoir, j'avais un problème de choix quant à la version du bunde à utiliser par composer de Symfony2, 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 :
 

Code :
  1. {
  2. "require":
  3. {
  4. "php": ">=5.3.3",
  5. "doctrine/doctrine-fixtures-bundle": "2.2.*@dev",
  6. "doctrine/doctrine-bundle": "~1.0",
  7. "symfony/doctrine-bridge": "~2.1",
  8. "doctrine/data-fixtures": "~1.0"
  9. }
  10. }


 
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 fichier AppKernel.php comme cela:
 

Code :
  1. class AppKernel extends Kernel
  2. {
  3. public function registerBundles()
  4. {
  5. $bundles = array(
  6. new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
  7. new Symfony\Bundle\SecurityBundle\SecurityBundle(),
  8. new Symfony\Bundle\TwigBundle\TwigBundle(),
  9. new Symfony\Bundle\MonologBundle\MonologBundle(),
  10. new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
  11. new Symfony\Bundle\AsseticBundle\AsseticBundle(),
  12. new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
  13. new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
  14. new Sdz\BlogBundle\SdzBlogBundle(),
  15. );
  16. if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  17. // $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
  18. $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
  19. $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
  20. $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
  21. $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
  22. }
  23. return $bundles;
  24. }


 
Les resultats du succès de la mise à jour des dépendances via composer
 

Code :
  1. C:\wamp\www\Symfony>php ../composer.phar update
  2. Loading composer repositories with package information
  3. Updating dependencies (including require-dev)
  4. - Removing twig/twig (v1.13.2)
  5. - Installing twig/twig (v1.14.0)
  6. Loading from cache
  7. - Installing doctrine/lexer (v1.0)
  8. Downloading: 100%
  9. - Installing doctrine/annotations (v1.1.2)
  10. Downloading: 100%
  11. Writing lock file
  12. Generating autoload files
  13. Updating the "app/config/parameters.yml" file.
  14. PHP Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle'
  15. not found in C:\wamp\www\Symfony\app\AppKernel.php on line 27
  16. PHP Stack trace:
  17. PHP 1. {main}() C:\wamp\www\Symfony\app\console:0
  18. PHP 2. Symfony\Component\Console\Application->run() C:\wamp\www\Symfony\app\co
  19. nsole:27
  20. PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() C:\wamp\www
  21. \Symfony\vendor\symfony\symfony\src\Symfony\Component\Console\Application.php:121
  22. PHP 4. Symfony\Component\HttpKernel\Kernel->boot() C:\wamp\www\Symfony\vendor\
  23. symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php:70
  24. PHP 5. Symfony\Component\HttpKernel\Kernel->initializeBundles() C:\wamp\www\Sy
  25. mfony\app\bootstrap.php.cache:2215
  26. PHP 6. AppKernel->registerBundles() C:\wamp\www\Symfony\app\bootstrap.php.cache:2385
  27. Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handl
  28. ing the post-update-cmd event terminated with an exception
  29. [RuntimeException]
  30. An error occurred when executing the ""cache:clear --no-warmup"" command.
  31. update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
  32. [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|v
  33. vv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
  34. C:\wamp\www\Symfony>


---------------
l'on s'enrichit d'avantage en partageant ces connaissances
mood
Publicité
Posté le 09-10-2013 à 06:47:35  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found

 

Sujets relatifs
Unable to load class "Twig_Environment"[PHP] Script de remplissage de base de données
Logiciel Gratuit Pour Sites en PHP[PHP] Upload multiples : variables ne passent pas si trop de volume
[PHP/JQuery] Liste déroulante suivit Autocomplete[PHP] IF qui fait l'inverse de ce qu'il doit faire...
[PHP] if elseif definition variable [resolu][PHP] php_flag ne marche pas
JAVA/ J2EE ou PHP ?Impossible d'executer script linux sous PHP
Plus de sujets relatifs à : PHP Fatal error: Class 'DoctrineBundleFixturesBundle not found


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR