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

Appearance settings

[Routing][4.1][BC Break] Controller names drop single colon notation #27522

Copy link
Copy link
Closed
@Majkl578

Description

@Majkl578
Issue body actions

Symfony version(s) affected: 4.1.0

Description
Route loader (DelegatingLoader) now always returns controllers with double-colon notation.
This breaks existing code that relies on the single-colon format.

How to reproduce
Have a controller referenced with single colons. Although the code affected is a custom route loader that generates such controller names, it shouldn't be directly needed to have one to reproduce.

Possible Solution
Revert the change for implicitly changing : to :::

$controller = str_replace(':', '::', $controller);

as commented here

Suggesting to keep the deprecation, but revert forced change from : to ::.

Additional context
The code affected performs different logic based on whether controller is single-colon or double-colon notation (in the _controller request attribute). Single colon is used for a controller that is registered as a DI service, double colon is used for non-registered controllers.
Although possibly unfortunate (dates back to SF 2.6), this has been working flawlessly until SF 4.1.

Introduced in #26085.

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

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