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

Commit 6bf7b82

Browse filesBrowse files
Remove last legacy codes
1 parent 4b30b6e commit 6bf7b82
Copy full SHA for 6bf7b82

File tree

Expand file treeCollapse file tree

6 files changed

+13
-48
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+13
-48
lines changed

‎src/Symfony/Bridge/Twig/Extension/RoutingExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Extension/RoutingExtension.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ public function getUrl($name, $parameters = array(), $schemeRelative = false)
9191
*
9292
* @return array An array with the contexts the URL is safe
9393
*
94-
* @final since version 3.4, type-hint to be changed to "\Twig\Node\Node" in 4.0
94+
* @final since version 3.4
9595
*/
96-
public function isUrlGenerationSafe(\Twig_Node $argsNode)
96+
public function isUrlGenerationSafe(Node $argsNode)
9797
{
9898
// support named arguments
9999
$paramsNode = $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : (

‎src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php
+7-17Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,12 @@
2626
*/
2727
class RouterCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface
2828
{
29-
protected $router;
29+
private $container;
3030

31-
/**
32-
* Constructor.
33-
*
34-
* @param ContainerInterface $container
35-
*/
36-
public function __construct($container)
31+
public function __construct(ContainerInterface $container)
3732
{
3833
// As this cache warmer is optional, dependencies should be lazy-loaded, that's why a container should be injected.
39-
if ($container instanceof ContainerInterface) {
40-
$this->router = $container->get('router'); // For BC, the $router property must be populated in the constructor
41-
} elseif ($container instanceof RouterInterface) {
42-
$this->router = $container;
43-
@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);
44-
} else {
45-
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
46-
}
34+
$this->container = $container;
4735
}
4836

4937
/**
@@ -53,8 +41,10 @@ public function __construct($container)
5341
*/
5442
public function warmUp($cacheDir)
5543
{
56-
if ($this->router instanceof WarmableInterface) {
57-
$this->router->warmUp($cacheDir);
44+
$router = $this->container->get('router');
45+
46+
if ($router instanceof WarmableInterface) {
47+
$router->warmUp($cacheDir);
5848
}
5949
}
6050

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -629,18 +629,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
629629
->info('validation configuration')
630630
->{!class_exists(FullStack::class) && class_exists(Validation::class) ? 'canBeDisabled' : 'canBeEnabled'}()
631631
->children()
632-
->scalarNode('cache')
633-
->beforeNormalization()
634-
// Can be removed in 4.0, when validator.mapping.cache.doctrine.apc is removed
635-
->ifString()->then(function ($v) {
636-
if ('validator.mapping.cache.doctrine.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
637-
throw new LogicException('Doctrine APC cache for the validator cannot be enabled as the Doctrine Cache package is not installed.');
638-
}
639-
640-
return $v;
641-
})
642-
->end()
643-
->end()
632+
->scalarNode('cache')->end()
644633
->booleanNode('enable_annotations')->{!class_exists(FullStack::class) && class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
645634
->arrayNode('static_method')
646635
->defaultValue(array('loadValidatorMetadata'))

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@
4949
</argument>
5050
</service>
5151

52-
<service id="validator.mapping.cache.doctrine.apc" class="Symfony\Component\Validator\Mapping\Cache\DoctrineCache">
53-
<argument type="service">
54-
<service class="Doctrine\Common\Cache\ApcCache">
55-
<call method="setNamespace">
56-
<argument>%validator.mapping.cache.prefix%</argument>
57-
</call>
58-
</service>
59-
</argument>
60-
<deprecated>The "%service_id%" service is deprecated since Symfony 3.4 and will be removed in 4.0. Use a Psr6 cache like "validator.mapping.cache.symfony" instead.</deprecated>
61-
</service>
62-
6352
<service id="validator.validator_factory" class="Symfony\Component\Validator\ContainerConstraintValidatorFactory">
6453
<argument /> <!-- Constraint validators locator -->
6554
</service>

‎src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ class WebProfilerExtensionTest extends TestCase
2727
*/
2828
private $container;
2929

30-
public static function assertSaneContainer(Container $container, $message = '', $knownPrivates = array())
30+
public static function assertSaneContainer(Container $container, $message = '')
3131
{
3232
$errors = array();
3333
foreach ($container->getServiceIds() as $id) {
34-
if (in_array($id, $knownPrivates, true)) { // to be removed in 4.0
35-
continue;
36-
}
3734
try {
3835
$container->get($id);
3936
} catch (\Exception $e) {
@@ -101,7 +98,7 @@ public function testToolbarConfig($toolbarEnabled, $interceptRedirects, $listene
10198

10299
$this->assertSame($listenerInjected, $this->container->has('web_profiler.debug_toolbar'));
103100

104-
$this->assertSaneContainer($this->getDumpedContainer(), '', array('web_profiler.csp.handler'));
101+
$this->assertSaneContainer($this->getDumpedContainer());
105102

106103
if ($listenerInjected) {
107104
$this->assertSame($listenerEnabled, $this->container->get('web_profiler.debug_toolbar')->isEnabled());

‎src/Symfony/Component/Form/FormInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormInterface.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function addError(FormError $error);
189189
/**
190190
* Returns whether the form and all children are valid.
191191
*
192-
* If the form is not submitted, this method always returns false (but will throw an exception in 4.0).
192+
* @throws Exception\LogicException If the form is not submitted.
193193
*
194194
* @return bool
195195
*/

0 commit comments

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