From 956003134590226789eede159c1d89f10ffd8281 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 May 2017 23:46:08 +0200 Subject: [PATCH] [Routing] remove deprecated features --- src/Symfony/Component/Routing/CHANGELOG.md | 6 ++++++ src/Symfony/Component/Routing/RouteCompiler.php | 6 ++---- src/Symfony/Component/Routing/Tests/RouteCompilerTest.php | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/Routing/CHANGELOG.md b/src/Symfony/Component/Routing/CHANGELOG.md index d04581f40506..206c1ccf612f 100644 --- a/src/Symfony/Component/Routing/CHANGELOG.md +++ b/src/Symfony/Component/Routing/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +4.0.0 +----- + + * dropped support for using UTF-8 route patterns without using the `utf8` option + * dropped support for using UTF-8 route requirements without using the `utf8` option + 3.3.0 ----- diff --git a/src/Symfony/Component/Routing/RouteCompiler.php b/src/Symfony/Component/Routing/RouteCompiler.php index a64776a01ae2..872203f3f5d6 100644 --- a/src/Symfony/Component/Routing/RouteCompiler.php +++ b/src/Symfony/Component/Routing/RouteCompiler.php @@ -103,8 +103,7 @@ private static function compilePattern(Route $route, $pattern, $isHost) $needsUtf8 = $route->getOption('utf8'); if (!$needsUtf8 && $useUtf8 && preg_match('/[\x80-\xFF]/', $pattern)) { - $needsUtf8 = true; - @trigger_error(sprintf('Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "%s".', $pattern), E_USER_DEPRECATED); + throw new \LogicException(sprintf('Cannot use UTF-8 route patterns without setting the "utf8" option for route "%s".', $route->getPath())); } if (!$useUtf8 && $needsUtf8) { throw new \LogicException(sprintf('Cannot mix UTF-8 requirements with non-UTF-8 pattern "%s".', $pattern)); @@ -176,8 +175,7 @@ private static function compilePattern(Route $route, $pattern, $isHost) if (!preg_match('//u', $regexp)) { $useUtf8 = false; } elseif (!$needsUtf8 && preg_match('/[\x80-\xFF]|(?