Upgrade to symfony 3 causes issues with whiteoctoberTCPDF

124 views Asked by At

error from composer update

hi I am trying to upgrade to symfony 3.0.* and when I ran " composer update " command I have this error concerning whiteoctober/tcpdf-bundle bundle :

Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache PHP Fatal error: Class 'Symfony\Component\HttpKernel\Kernel' not found in /var/www/html/dlup/app/AppKernel.php on line 6 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]                                                                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command:                                                  
PHP Fatal error:  Class 'Symfony\Component\HttpKernel\Kernel' not found in /var/www/html/dlup/app/AppKernel.php on line 6 
1

There are 1 answers

0
paule mandengue On

to solve my problem . first i autoload the kernel by adding in my composer.json file

"autoload": {
        "files":    [ "app/AppKernel.php" ]
    },

then i modify the file app/console.php by adding on the top :

require_once DIR.'/autoload.php';

and i comment the line

//require_once __DIR__.'/AppKernel.php';

for more information go to https://github.com/symfony/symfony-standard/issues/868

after i delete the bundle whiteoctober/tcpdf-bundle manually . the i look for a version compatible with symfony 3.3.2 which is the symfony 's version i am using . I add this require in my composer.json file

"require": { "whiteoctober/tcpdf-bundle": "~the_Compatible_version_for_you" },

for me i did

    "require": {
"whiteoctober/tcpdf-bundle": "dev-master"
    },