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:
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
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> |
Partager