Description
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);
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.