8000 Cannot redeclare class Symfony\Component\HttpKernel\HttpKernel on 3.4.x-dev · Issue #25059 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Cannot redeclare class Symfony\Component\HttpKernel\HttpKernel on 3.4.x-dev #25059

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
ibasaw opened this issue Nov 20, 2017 · 6 comments
Closed

Comments

@ibasaw
Copy link
ibasaw commented Nov 20, 2017
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.x-dev
php -v
PHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

composer.json
...

    "require": {
        "php": ">=5.5.9",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/orm": "^2.5",
        "incenteev/composer-parameter-handler": "^2.0",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^5.0.0",
        "symfony/monolog-bundle": "^3.1.0",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.6.4",
        "symfony/symfony": "3.4.x-dev",
        "twig/twig": "^1.0||^2.0",
        "symfony/assetic-bundle": "^2.8"
    },

...

On fresh install, when i browse the homepage / and hit refresh on browser, i got this error, only work once the first time load.

(1/1) FatalErrorExceptionCompile Error: Cannot redeclare class Symfony\Component\HttpKernel\HttpKernel
--
in HttpKernel.php (line 39)
in getHttpKernelService.php (line 10)
in appDevDebugProjectContainer.php (line 695)
at appDevDebugProjectContainer->load()in classes.php (line 3372)
at Container->get()in Kernel.php (line 215)
at Kernel->getHttpKernel()in Kernel.php (line 202)
at Kernel->handle()in app_dev.php (line 14)
at {main}()in app_dev.php (line 0)

console not loading

if i replace "symfony/symfony": "3.4.x-dev", to "symfony/symfony": "3.3.x-dev", it works.

@ibasaw ibasaw changed the title Cannot redeclare class Symfony\Component\HttpKernel\HttpKernel 3.4.x-dev Cannot redeclare class Symfony\Component\HttpKernel\HttpKernel on 3.4.x-dev Nov 20, 2017
@Simperfit
Copy link
Contributor

Could you do the following, so we could get a reproducer ?

In case you need some help you can read this blog post : https://symfony.com/doc/current/contributing/code/reproducer.html

@pink6440
Copy link

Hello,

I got the same kind of error

(1/1) FatalErrorExceptionCompile Error: Cannot redeclare class Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser
--
in ControllerNameParser.php (line 24)
"require": {
        "php": ">=5.5.9",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/orm": "^2.5",
        "incenteev/composer-parameter-handler": "^2.0",
        "jms/serializer": "^1.9",
        "liuggio/excelbundle": "^2.1",
        "sensio/distribution-bundle": "^5.0.19",
        "sensio/framework-extra-bundle": "^5.0.0",
        "symfony/monolog-bundle": "^3.1.0",
        "symfony/polyfill-apcu": "^1.0",
        "symfony/swiftmailer-bundle": "^2.6.4",
        "symfony/symfony": "3.4.x-dev",
        "twig/twig": "^1.0||^2.0"
PHP 5.6.3 (cli) (built: Nov 12 2014 17:19:25)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
$ php bin/console --version
Symfony 3.4.0-DEV (kernel: app, env: dev, debug: true)

@ibasaw
Copy link
Author
ibasaw commented Nov 21, 2017

@xabbuh
Copy link
Member
xabbuh commented Nov 21, 2017

Does the issue persist if you disable the loadClassCache() call in the front controller?

@nicolas-grekas
Copy link
Member

@xabbuh same here, but add SensioDistributionBundle to the mix, generating bootstrap.cache.php...
Should be fixed by #25082

@ibasaw
Copy link
Author
ibasaw commented Nov 21, 2017

@xabbuh Where to do this ?

fabpot added a commit that referenced this issue Nov 21, 2017
…ng has been used (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Disable container inlining when legacy inlining has been used

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25059
| License       | MIT
| Doc PR        | -

Commits
-------

4a11683 [HttpKernel] Disable container inlining when legacy inlining has been used
@fabpot fabpot closed this as completed Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
0