Skip to content

Multiple AppKernel class #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fradnetcom opened this issue Apr 24, 2017 · 2 comments
Closed

Multiple AppKernel class #282

fradnetcom opened this issue Apr 24, 2017 · 2 comments

Comments

@fradnetcom
Copy link

fradnetcom commented Apr 24, 2017

After update Symfony 2.8 to 3.x i get this error

PHP Fatal error:  Class 'AppKernel' not found in /var/www/example_project/bin/console on line 27
PHP Stack trace:
PHP   1. {main}() /var/www/example_project/bin/console:0
PHP Fatal error:  Cannot redeclare class AppKernel in /var/www/example_project/vendor/helios-ag/fm-elfinder-bundle/Tests/Functional/AppKernel.php on line 23
PHP Stack trace:
PHP   1. {main}() /var/www/example_project/bin/console:0
PHP   2. Symfony\Component\Debug\ErrorHandler::handleFatalError() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:0
PHP   3. Symfony\Component\Debug\ErrorHandler->handleException() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:621
PHP   4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:549
PHP   5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php:62
PHP   6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php:118
PHP   7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php:143
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 'AppKernel' not found in /var/www/example_project/bin/console on line 27                                                                                                         
  PHP Stack trace:                                                                                                                                                                                        
  PHP   1. {main}() /var/www/example_project/bin/console:0                                                                                                                                                 
  PHP Fatal error:  Cannot redeclare class AppKernel in /var/www/example_project/vendor/helios-ag/fm-elfinder-bundle/Tests/Functional/AppKernel.php on line 23                                             
  PHP Stack trace:                                                                                                                                                                                        
  PHP   1. {main}() /var/www/example_project/bin/console:0                                                                                                                                                 
  PHP   2. Symfony\Component\Debug\ErrorHandler::handleFatalError() /var/www/example_projectvendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:0                                         
  PHP   3. Symfony\Component\Debug\ErrorHandler->handleException() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:621                                        
  PHP   4. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->handleError() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:549        
  PHP   5. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->getClassCandidates() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/C  
  lassNotFoundFatalErrorHandler.php:62                                                                                                                                                                    
  PHP   6. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->findClassInPath() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/Clas  
  sNotFoundFatalErrorHandler.php:118                                                                                                                                                                      
  PHP   7. Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler->convertFileToClass() /var/www/example_project/vendor/symfony/symfony/src/Symfony/Component/Debug/FatalErrorHandler/C  
  lassNotFoundFatalErrorHandler.php:143

Some solution how fix this ?

@helios-ag
Copy link
Owner

@fradnetcom can you share (on gist) your whole composer.json please

@fradnetcom
Copy link
Author

I solved problem - in old version don't have in composer classmap:

"autoload": {
        "psr-4": {
            "": "src/"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },

Now is workin ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants