Bonjour à tous !
J'ai pu installer PHPExcelBundle via composer puis j'ai enregistré le nouveau bundle dans app\AppKernel.php.
AppKernel
Composer.json
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 <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; 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 Liuggio\ExcelBundle\LiuggioExcelBundle(), new depCinke\depCinkeBundle\depCinkedepCinkeBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
Répertoire d’installation de phpoffice/phpExcel :
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 { "name": "symfony/symfony", "type": "library", "description": "The Symfony PHP framework", "keywords": ["framework"], "homepage": "http://symfony.com", "license": "MIT", "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" } ], "require": { "php": ">=5.3.3", "doctrine/common": "~2.2", "twig/twig": "~1.12", "psr/log": "~1.0", "twitter/bootstrap": "3.2.0", "symfony/framework-bundle": "~2.1", "phpoffice/phpexcel": "~1.8.0", "liuggio/excelbundle": "~2.0", "components/jquery": "1.11.1" }, "require-dev": { "doctrine/data-fixtures": "1.0.*", "doctrine/dbal": "~2.2", "doctrine/orm": "~2.2,>=2.2.3", "monolog/monolog": "~1.3", "propel/propel1": "1.6.*", "ircmaxell/password-compat": "1.0.*", "ocramius/proxy-manager": ">=0.3.1,<0.6-dev", "egulias/email-validator": "~1.2", "phpunit/phpunit": ">=3.7", "symfony/finder": "~2.0", "symfony/form": "~2.1", "symfony/class-loader": "~2.1", "symfony/validator": "~2.1", "symfony/browser-kit": "~2.1", "sensio/framework-extra-bundle": "~2.1" }, "autoload": { "psr-0": { "Symfony\\": "src/" }, "classmap": [ "src/Symfony/Component/HttpFoundation/Resources/stubs", "src/Symfony/Component/Intl/Resources/stubs" ], "files": [ "src/Symfony/Component/Intl/Resources/stubs/functions.php" ] }, "minimum-stability": "stable", "extra": { "branch-alias": { "dev-master": "2.5-dev" } } }
\Symfony\vendor\symfony\symfony\vendor\phpoffice\phpexcel
Répertoire d’installation du bundle luiggio :
Symfony\vendor\symfony\symfony\vendor\liuggio\ExcelBundle\Liuggio\ExcelBundle
Pourtant je ne cesse d'avoir l'erreur suivante (uniquement quand le bundle luiggio est référencé dans AppKernel.php)
ClassNotFoundException: Attempted to load class "LiuggioExcelBundle" from namespace "Liuggio\ExcelBundle" in C:\wamp\www\Symfony\app\AppKernel.php line 20. Do you need to "use" it from another namespace?
EDIT :
Ci dessous une partie de mon autoload_namespace.php
Normalement avec cette erreur j'aurais ajouté un 'use' mais cela me parait étrange d'en rajouter un dans AppKernel.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 'PHPExcel' => array($vendorDir . '/phpExcel/Classes', $vendorDir . '/phpoffice/phpexcel/Classes'), 'Liuggio\\ExcelBundle' => array($vendorDir . '/liuggio/ExcelBundle'),
Avez vous une idée de l'erreur ? Merci !
Partager