Skip to content

Navigation Menu

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

Appearance settings

[FrameworkBundle] Error when rendering static templates #52655

Copy link
Copy link
Closed
@javiereguiluz

Description

@javiereguiluz
Issue body actions

Symfony version(s) affected

7.0

Description

When updating Symfony Demo to 7.0, I'm seeing this error:

An exception has been thrown during the rendering of a template:
"Callable "Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction()"
is not allowed as a controller.

Did you miss tagging it with "#[AsController]" or registering its type with 
"Symfony\Component\HttpKernel\Controller\ControllerResolver::allowControllers()"?"

This error doesn't happen in 6.4.

How to reproduce

Just run the Symfony Demo with 7.0. Whenever Symfony finds a TemplateController::templateAction it will show the error. For example:

https://github.com/symfony/demo/blob/206f0c9aab07cdc9f7437640b12947d35e9d5e72/templates/base.html.twig#L138-L142

https://github.com/symfony/demo/blob/206f0c9aab07cdc9f7437640b12947d35e9d5e72/config/routes.yaml#L5-L12

Possible Solution

I don't know. But this only happens in Symfony 7.0, not 6.4.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.