diff --git a/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php b/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
index 92a520eda3fb5..4875b1fab8452 100644
--- a/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
+++ b/src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
@@ -91,9 +91,9 @@ public function getUrl($name, $parameters = array(), $schemeRelative = false)
*
* @return array An array with the contexts the URL is safe
*
- * @final since version 3.4, type-hint to be changed to "\Twig\Node\Node" in 4.0
+ * @final since version 3.4
*/
- public function isUrlGenerationSafe(\Twig_Node $argsNode)
+ public function isUrlGenerationSafe(Node $argsNode)
{
// support named arguments
$paramsNode = $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : (
diff --git a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php
index ffde2dcd92293..5c360bc334409 100644
--- a/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php
+++ b/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php
@@ -26,24 +26,12 @@
*/
class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface
{
- protected $router;
+ private $container;
- /**
- * Constructor.
- *
- * @param ContainerInterface $container
- */
- public function __construct($container)
+ public function __construct(ContainerInterface $container)
{
// As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected.
- if ($container instanceof ContainerInterface) {
- $this->router = $container->get('router'); // For BC, the $router property must be populated in the constructor
- } elseif ($container instanceof RouterInterface) {
- $this->router = $container;
- @trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since version 3.4 and will be unsupported in version 4.0. Use a %s instead.', RouterInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
- } else {
- throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
- }
+ $this->container = $container;
}
/**
@@ -53,8 +41,10 @@ public function __construct($container)
*/
public function warmUp($cacheDir)
{
- if ($this->router instanceof WarmableInterface) {
- $this->router->warmUp($cacheDir);
+ $router = $this->container->get('router');
+
+ if ($router instanceof WarmableInterface) {
+ $router->warmUp($cacheDir);
}
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
index 917abe4a6978a..62313cb441652 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -629,18 +629,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
->info('validation configuration')
->{!class_exists(FullStack::class) && class_exists(Validation::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->children()
- ->scalarNode('cache')
- ->beforeNormalization()
- // Can be removed in 4.0, when validator.mapping.cache.doctrine.apc is removed
- ->ifString()->then(function ($v) {
- if ('validator.mapping.cache.doctrine.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
- throw new LogicException('Doctrine APC cache for the validator cannot be enabled as the Doctrine Cache package is not installed.');
- }
-
- return $v;
- })
- ->end()
- ->end()
+ ->scalarNode('cache')->end()
->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
->arrayNode('static_method')
->defaultValue(array('loadValidatorMetadata'))
diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
index aa472d380cb33..6d7344c292fca 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
+++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
@@ -49,17 +49,6 @@
-
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: