Skip to content

Commit f2f8e75

Browse files
author
Hugo Hamon
committed
Adds deprecation notices for structures to be removed in 3.0.
1 parent 1006f54 commit f2f8e75

20 files changed

+52
-23
lines changed

Debug/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\Debug;
1313

14-
trigger_error('Symfony\Component\HttpKernel\Debug\ErrorHandler is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component instead.', E_USER_DEPRECATED);
14+
trigger_error('The '.__NAMESPACE__.'\ErrorHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ErrorHandler class instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler;
1717

Debug/ExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\Debug;
1313

14-
trigger_error('Symfony\Component\HttpKernel\Debug\ExceptionHandler is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component instead.', E_USER_DEPRECATED);
14+
trigger_error('The '.__NAMESPACE__.'\ExceptionHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ExceptionHandler class instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler;
1717

Debug/TraceableEventDispatcher.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
3838
*/
3939
public function setProfiler(Profiler $profiler = null)
4040
{
41+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
4142
}
4243

4344
/**

DependencyInjection/RegisterListenersPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace Symfony\Component\HttpKernel\DependencyInjection;
1313

14-
trigger_error('Class "Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass" is deprecated since 2.5 and will be removed in 3.0. Use "Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass" instead.', E_USER_DEPRECATED);
14+
trigger_error('The '.__NAMESPACE__.'\RegisterListenersPass is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass;
1717

1818
/**
1919
* Compiler pass to register tagged services for an event dispatcher.
2020
*
21-
* @deprecated Deprecated in 2.5, to be removed in 3.0. Use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass instead.
21+
* @deprecated since version 2.5, to be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead.
2222
*/
2323
class RegisterListenersPass extends BaseRegisterListenersPass
2424
{

EventListener/ErrorsLoggerListener.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

14+
trigger_error('The '.__NAMESPACE__.'\ErrorsLoggerListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\DebugHandlersListener class instead.', E_USER_DEPRECATED);
15+
1416
use Psr\Log\LoggerInterface;
1517
use Symfony\Component\Debug\ErrorHandler;
1618
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -22,12 +24,11 @@
2224
* @author Colin Frei <[email protected]>
2325
* @author Konstantin Myakshin <[email protected]>
2426
*
25-
* @deprecated since 2.6, to be removed in 3.0. Use DebugHandlersListener instead.
27+
* @deprecated since version 2.6, to be removed in 3.0. Use the DebugHandlersListener class instead.
2628
*/
2729
class ErrorsLoggerListener implements EventSubscriberInterface
2830
{
2931
private $channel;
30-
3132
private $logger;
3233

3334
public function __construct($channel, LoggerInterface $logger = null)

EventListener/EsiListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

14+
trigger_error('The '.__NAMESPACE__.'\EsiListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\SurrogateListener class instead.', E_USER_DEPRECATED);
15+
1416
/**
1517
* EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI.
1618
*

EventListener/FragmentListener.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ protected function validateRequest(Request $request)
8888
}
8989

9090
/**
91-
* @deprecated Deprecated since 2.3.19, to be removed in 3.0.
91+
* @deprecated since version 2.3.19, to be removed in 3.0.
9292
*
9393
* @return string[]
9494
*/
9595
protected function getLocalIpAddresses()
9696
{
97+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3.19 and will be removed in 3.0.', E_USER_DEPRECATED);
98+
9799
return array('127.0.0.1', 'fe80::1', '::1');
98100
}
99101

EventListener/LocaleListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public function __construct($defaultLocale = 'en', RequestContextAwareInterface
5858
*/
5959
public function setRequest(Request $request = null)
6060
{
61+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
62+
6163
if (null === $request) {
6264
return;
6365
}

EventListener/ProfilerListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public function onKernelException(GetResponseForExceptionEvent $event)
7777
*/
7878
public function onKernelRequest(GetResponseEvent $event)
7979
{
80+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
81+
8082
if (null === $this->requestStack) {
8183
$this->requests[] = $event->getRequest();
8284
}

EventListener/RouterListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public function __construct($matcher, RequestContext $context = null, LoggerInte
8686
*/
8787
public function setRequest(Request $request = null)
8888
{
89+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be made private in 3.0.', E_USER_DEPRECATED);
90+
8991
if (null !== $request && $this->request !== $request) {
9092
$this->context->fromRequest($request);
9193
}

0 commit comments

Comments
 (0)