Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Using HttpCache with unbooted Kernel fails #40624

Closed
@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected: 5.2.6

Description

Since the changes of#40497 (/cc@xabbuh) the HttpCache fails as the container is accessed inside theHttpCache class. This can only be done when the kernel is booted, which we in@sulu want to avoid when theHttpCache is used.

How to reproduce

git clone git@github.com:sulu/skeleton.gitcd skeleton

Add following to your.env.local file:

APP_ENV=prodDATABASE_URL=mysql://root:@127.0.0.1:3306/su_develop?serverVersion=5.7
bin/console sulu:build dev# optional error should appear before

Start webserver.

Visit the homepage:

Fatal error: Uncaught LogicException: Cannot retrieve the container from a non-booted kernel. in /Sulu-cms/sulu-develop.localhost/vendor/symfony/http-kernel/Kernel.php:307 Stack trace: #0 /sulu-cms/sulu-develop.localhost/vendor/symfony/framework-bundle/HttpCache/HttpCache.php(68): Symfony\Component\HttpKernel\Kernel->getContainer()#1 /sulu-cms/sulu-develop.localhost/vendor/friendsofsymfony/http-cache/src/SymfonyCache/EventDispatchingHttpCache.php(103): Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)#2 /sulu-cms/sulu-develop.localhost/public/index.php(66): Sulu\Bundle\HttpCacheBundle\Cache\SuluHttpCache->handle(Object(Symfony\Component\HttpFoundation\Request))#3 {main} thrown in /Users/sulu-cms/sulu-develop.localhost/vendor/symfony/http-kernel/Kernel.php on line 307

Possible Solution

Thecontainer should not be accessed as the Kernel could not be booted yet.

Additional context

The@sulu CMS does not use theframework.http_cache option it use the HttpCache without a bootet Kernel.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp