Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Welcome page is shown only once in event loop based runtimes. #53686

Closed
@luzrain

Description

@luzrain

Symfony version(s) affected

7.0.2

Description

In runtimes with always loaded kernel, the welcome page (route: /) is displayed only once on the first request. All subsequent requests show a blank page.

The reason is include_once here:

include_once \dirname(__DIR__).'/Resources/welcome.html.php';

How to reproduce

Run a freshly installed, empty symfony project in any event loop based runtime, go to / path to see the welcome page, refresh the page.

Possible Solution

Replace include_once with include in RouterListener.php.
Don't use functions in the welcome.html.php file, because it causes function redeclaration errors when the file is included more than once.

Additional Context

No response

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