undeprecate the single-colon notation for controllers

This commit is contained in:
Fabien Bourigault 2018-11-30 13:06:13 +01:00
parent a4bc4ac0ce
commit 09371ad6f1
2 changed files with 1 additions and 2 deletions

View File

@ -95,7 +95,7 @@ class DelegatingLoader extends BaseDelegatingLoader
if (1 === substr_count($controller, ':')) { if (1 === substr_count($controller, ':')) {
$nonDeprecatedNotation = str_replace(':', '::', $controller); $nonDeprecatedNotation = str_replace(':', '::', $controller);
@trigger_error(sprintf('Referencing controllers with a single colon is deprecated since Symfony 4.1, use "%s" instead.', $nonDeprecatedNotation), E_USER_DEPRECATED); // TODO deprecate this in 5.1
} }
$route->setDefault('_controller', $controller); $route->setDefault('_controller', $controller);

View File

@ -25,7 +25,6 @@ class DelegatingLoaderTest extends TestCase
/** /**
* @group legacy * @group legacy
* @expectedDeprecation Referencing controllers with foo:bar:baz is deprecated since Symfony 4.1, use "some_parsed::controller" instead. * @expectedDeprecation Referencing controllers with foo:bar:baz is deprecated since Symfony 4.1, use "some_parsed::controller" instead.
* @expectedDeprecation Referencing controllers with a single colon is deprecated since Symfony 4.1, use "foo::baz" instead.
*/ */
public function testLoad() public function testLoad()
{ {