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 1195613

Browse filesBrowse files
committed
[3.0][HttpKernel] remove deprecated functions and classes
1 parent e4162fc commit 1195613
Copy full SHA for 1195613

26 files changed

+23
-845
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function load(array $configs, ContainerBuilder $container)
142142
$loader->load('debug.xml');
143143

144144
$definition = $container->findDefinition('http_kernel');
145-
$definition->replaceArgument(2, new Reference('debug.controller_resolver'));
145+
$definition->replaceArgument(1, new Reference('debug.controller_resolver'));
146146

147147
// replace the regular event_dispatcher service with the debug one
148148
$definition = $container->findDefinition('event_dispatcher');

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
<argument type="service" id="service_container" />
1010
</service>
1111

12-
<service id="http_kernel" class="Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel">
12+
<service id="http_kernel" class="Symfony\Component\HttpKernel\HttpKernel">
1313
<argument type="service" id="event_dispatcher" />
14-
<argument type="service" id="service_container" />
1514
<argument type="service" id="controller_resolver" />
1615
<argument type="service" id="request_stack" />
1716
</service>

‎src/Symfony/Component/HttpKernel/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ CHANGELOG
66

77
* removed `Symfony\Component\HttpKernel\Kernel::init()`
88
* removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()`
9+
* removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()`
10+
* removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()`
11+
* removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()`
12+
* removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()`
13+
* removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()`
14+
* removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()`
15+
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()`
16+
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()`
17+
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()`
18+
* removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()`
19+
* removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel`
20+
* removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`
21+
* removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`
22+
* removed `Symfony\Component\HttpKernel\EventListener\EsiListener`
23+
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy`
24+
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface`
25+
* removed `Symfony\Component\HttpKernel\Log\LoggerInterface`
26+
* removed `Symfony\Component\HttpKernel\Log\NullLogger`
927

1028
2.7.0
1129
-----

‎src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,8 @@ public function getDumps($format, $maxDepthLimit = -1, $maxItemsPerDepth = -1)
200200
foreach ($this->data as $dump) {
201201
if (method_exists($dump['data'], 'withMaxDepth')) {
202202
$dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth));
203-
} else {
204-
// getLimitedClone is @deprecated, to be removed in 3.0
205-
$dumper->dump($dump['data']->getLimitedClone($maxDepthLimit, $maxItemsPerDepth));
206203
}
204+
207205
rewind($data);
208206
$dump['data'] = stream_get_contents($data);
209207
ftruncate($data, 0);

‎src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
-17Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpKernel\Debug;
1313

1414
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher;
15-
use Symfony\Component\HttpKernel\Profiler\Profiler;
1615
use Symfony\Component\HttpKernel\KernelEvents;
1716
use Symfony\Component\EventDispatcher\Event;
1817

@@ -25,22 +24,6 @@
2524
*/
2625
class TraceableEventDispatcher extends BaseTraceableEventDispatcher
2726
{
28-
/**
29-
* Sets the profiler.
30-
*
31-
* The traceable event dispatcher does not use the profiler anymore.
32-
* The job is now done directly by the Profiler listener and the
33-
* data collectors themselves.
34-
*
35-
* @param Profiler|null $profiler A Profiler instance
36-
*
37-
* @deprecated since version 2.4, to be removed in 3.0.
38-
*/
39-
public function setProfiler(Profiler $profiler = null)
40-
{
41-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
42-
}
43-
4427
/**
4528
* {@inheritdoc}
4629
*/

‎src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php
-77Lines changed: 0 additions & 77 deletions
This file was deleted.

‎src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\HttpKernel\DependencyInjection;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\DependencyInjection\Reference;
1615
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1716

1817
/**
@@ -59,14 +58,7 @@ public function process(ContainerBuilder $container)
5958
}
6059

6160
foreach ($tags as $tag) {
62-
if (!isset($tag['alias'])) {
63-
trigger_error(sprintf('Service "%s" will have to define the "alias" attribute on the "%s" tag as of Symfony 3.0.', $id, $this->rendererTag), E_USER_DEPRECATED);
64-
65-
// register the handler as a non-lazy-loaded one
66-
$definition->addMethodCall('addRenderer', array(new Reference($id)));
67-
} else {
68-
$definition->addMethodCall('addRendererService', array($tag['alias'], $id));
69-
}
61+
$definition->addMethodCall('addRendererService', array($tag['alias'], $id));
7062
}
7163
}
7264
}

‎src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
-25Lines changed: 0 additions & 25 deletions
This file was deleted.

‎src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php
-52Lines changed: 0 additions & 52 deletions
This file was deleted.

‎src/Symfony/Component/HttpKernel/EventListener/EsiListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/EsiListener.php
-25Lines changed: 0 additions & 25 deletions
This file was deleted.

‎src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ protected function duplicateRequest(\Exception $exception, Request $request)
107107
'_controller' => $this->controller,
108108
'exception' => FlattenException::create($exception),
109109
'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null,
110-
// keep for BC -- as $format can be an argument of the controller callable
111-
// see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
112-
// @deprecated since version 2.4, to be removed in 3.0
113-
'format' => $request->getRequestFormat(),
114110
);
115111
$request = $request->duplicate(null, null, $attributes);
116112
$request->setMethod('GET');

‎src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,6 @@ protected function validateRequest(Request $request)
8787
throw new AccessDeniedHttpException();
8888
}
8989

90-
/**
91-
* @deprecated since version 2.3.19, to be removed in 3.0.
92-
*
93-
* @return string[]
94-
*/
95-
protected function getLocalIpAddresses()
96-
{
97-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3.19 and will be removed in 3.0.', E_USER_DEPRECATED);
98-
99-
return array('127.0.0.1', 'fe80::1', '::1');
100-
}
101-
10290
public static function getSubscribedEvents()
10391
{
10492
return array(

‎src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
-23Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,6 @@ public function __construct($defaultLocale = 'en', RequestContextAwareInterface
4545
$this->router = $router;
4646
}
4747

48-
/**
49-
* Sets the current Request.
50-
*
51-
* This method was used to synchronize the Request, but as the HttpKernel
52-
* is doing that automatically now, you should never call it directly.
53-
* It is kept public for BC with the 2.3 version.
54-
*
55-
* @param Request|null $request A Request instance
56-
*
57-
* @deprecated since version 2.4, to be removed in 3.0.
58-
*/
59-
public function setRequest(Request $request = null)
60-
{
61-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
62-
63-
if (null === $request) {
64-
return;
65-
}
66-
67-
$this->setLocale($request);
68-
$this->setRouterContext($request);
69-
}
70-
7148
public function onKernelRequest(GetResponseEvent $event)
7249
{
7350
$request = $event->getRequest();

0 commit comments

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