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

  FORUM HardWare.fr
  Programmation
  PHP

   FatalErrorException: Error: Class 'Doctrine\Bundle\FixturesBundle\Doc

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

FatalErrorException: Error: Class 'Doctrine\Bundle\FixturesBundle\Doc

n°2206363
coolpythea​s
l'union fait la force
Posté le 11-10-2013 à 05:22:19  profilanswer
 

Bonsoir,j'arrive pas à installer mon bundle doctrine/doctrine-fixtures-bundle avec Composer.voici comment j'ai procédé:
je suis parti sur ce site:https://packagist.org/packages/doct [...] res-bundle, j'ai choisi la version dev-master / 2.2.x-dev parce qu'elle est la plus récente.Pour information j'utilise Symfony_Standard_Vendors_2.3.4 et php 5.3.10 ,mais j'ai un sérieux problème quant au choix des dépendances à inscrire dans mon fichier Composer.json,voici comment je l'ai rempli:
 
   

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


 
 
je ne sais pas si toutes les dépendances ont été prises en compte ou si j'en ai trop mis.Le cours que j'ai ne détaille pas beaucoup comment cherché les dépendances afin de les inscrire dans le fichier.json.
Après cela, j'ai tenté de mettre à jour les dépendances par la commande:
php ../composer.phar update et voici ce que ça affiche comme message d'erreur:
 
   

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


 
 
je me suis dit qu'il fallait peut-être effacer le cache,je reçois toujours le même message d'erreur:
 
C:\wamp\www\Symfony>php app/console cache:clear
PHP Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle'
not found in C:\wamp\www\Symfony\app\AppKernel.php on line 27.

 
Je me suis quand même entêté à enregistré mon bundle dans le Kernel comme ceci:
 
   

Code :
  1. <?php
  2.    
  3.     use Symfony\Component\HttpKernel\Kernel;
  4.     use Symfony\Component\Config\Loader\LoaderInterface;
  5.    
  6.     class AppKernel extends Kernel
  7.     {
  8.     public function registerBundles()
  9.     {
  10.     $bundles = array(
  11.     .
  12.     .
  13.     .
  14.     );
  15.    
  16.     if (in_array($this->getEnvironment(), array('dev', 'test'))) {
  17.     .
  18.     .
  19.     .
  20.     $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
  21.     }
  22.    
  23.     return $bundles;
  24.     }
  25.    
  26.     public function registerContainerConfiguration(LoaderInterface $loader)
  27.     {
  28.     $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
  29.     }
  30.     }


 
 
Quand je lance l'URL :
 
    http://localhost/Symfony/web/app_dev.php/blog

j'optiens ce message d'erreur: FatalErrorException: Error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not found in C:\wamp\www\Symfony\app\AppKernel.php line 27 je me dis dis que j'ai certainement pas bien créer mon fichier composer.json avec les dépendances qu'il faut.
Vraiment j'ai besoin de vos expériences pour décanter cette situation afin de comprendre ce qui ne tourne pas rond et de continuer dans mon autoformation.Merci d'avance.


---------------
l'on s'enrichit d'avantage en partageant ces connaissances
mood
Publicité
Posté le 11-10-2013 à 05:22:19  profilanswer
 


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

   FatalErrorException: Error: Class 'Doctrine\Bundle\FixturesBundle\Doc

 

Sujets relatifs
PHP Fatal error: Class 'DoctrineBundleFixturesBundle not foundUnable to load class "Twig_Environment"
Catchable fatal errorPHP Fatal error - Allowed memory size exhausted
no class definition found exceptionJAXB JSON extends class
Javascript Erreur NS_ERROR_XPC_BAD_CONVERTJS : reference error x is undefined
sauvegarder en session une action .Class Jquery 
Plus de sujets relatifs à : FatalErrorException: Error: Class 'Doctrine\Bundle\FixturesBundle\Doc


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