Skip to content

Commit 6cff730

Browse files
committed
[HttpKernel] remove all deprecated code from http kernel
1 parent 2a631ec commit 6cff730

File tree

70 files changed

+347
-1069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+347
-1069
lines changed

UPGRADE-5.0.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ HttpKernel
241241
----------
242242

243243
* Removed `Client`, use `HttpKernelBrowser` instead
244-
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been removed
244+
* The `Kernel::getRootDir()` and the `kernel.root_dir` parameter have been removed use `Kernel::getProjectDir()` and the `kernel.project_dir` instead
245245
* The `KernelInterface::getName()` and the `kernel.name` parameter have been removed
246246
* Removed the first and second constructor argument of `ConfigDataCollector`
247247
* Removed `ConfigDataCollector::getApplicationName()`
@@ -254,6 +254,7 @@ HttpKernel
254254
* Removed `GetResponseForExceptionEvent`, use `ExceptionEvent` instead
255255
* Removed `PostResponseEvent`, use `TerminateEvent` instead
256256
* Removed `TranslatorListener` in favor of `LocaleAwareListener`
257+
* Removed `SaveSessionListener` in favor of `AbstractSessionListener`
257258
* The `DebugHandlersListener` class has been made `final`
258259

259260
Intl

src/Symfony/Bridge/Monolog/Handler/ChromePhpHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Monolog\Handler\ChromePHPHandler as BaseChromePhpHandler;
1515
use Symfony\Component\HttpFoundation\Response;
16-
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
16+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
1717

1818
/**
1919
* ChromePhpHandler.
@@ -34,7 +34,7 @@ class ChromePhpHandler extends BaseChromePhpHandler
3434
/**
3535
* Adds the headers to the response once it's created.
3636
*/
37-
public function onKernelResponse(FilterResponseEvent $event)
37+
public function onKernelResponse(ResponseEvent $event)
3838
{
3939
if (!$event->isMasterRequest()) {
4040
return;

src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Monolog\Handler\FirePHPHandler as BaseFirePHPHandler;
1515
use Symfony\Component\HttpFoundation\Response;
16-
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
16+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
1717

1818
/**
1919
* FirePHPHandler.
@@ -34,7 +34,7 @@ class FirePHPHandler extends BaseFirePHPHandler
3434
/**
3535
* Adds the headers to the response once it's created.
3636
*/
37-
public function onKernelResponse(FilterResponseEvent $event)
37+
public function onKernelResponse(ResponseEvent $event)
3838
{
3939
if (!$event->isMasterRequest()) {
4040
return;

src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Monolog\Handler\SwiftMailerHandler as BaseSwiftMailerHandler;
1515
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
16-
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
16+
use Symfony\Component\HttpKernel\Event\TerminateEvent;
1717

1818
/**
1919
* Extended SwiftMailerHandler that flushes mail queue if necessary.
@@ -36,7 +36,7 @@ public function setTransport(\Swift_Transport $transport)
3636
/**
3737
* After the kernel has been terminated we will always flush messages.
3838
*/
39-
public function onKernelTerminate(PostResponseEvent $event)
39+
public function onKernelTerminate(TerminateEvent $event)
4040
{
4141
$this->instantFlush = true;
4242
}

src/Symfony/Bridge/Monolog/Processor/RouteProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1515
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
16-
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16+
use Symfony\Component\HttpKernel\Event\RequestEvent;
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818
use Symfony\Contracts\Service\ResetInterface;
1919

@@ -47,7 +47,7 @@ public function reset()
4747
$this->routeData = [];
4848
}
4949

50-
public function addRouteData(GetResponseEvent $event)
50+
public function addRouteData(RequestEvent $event)
5151
{
5252
if ($event->isMasterRequest()) {
5353
$this->reset();

src/Symfony/Bridge/Monolog/Processor/WebProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Monolog\Processor\WebProcessor as BaseWebProcessor;
1515
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
16-
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
16+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818

1919
/**
@@ -31,7 +31,7 @@ public function __construct(array $extraFields = null)
3131
parent::__construct([], $extraFields);
3232
}
3333

34-
public function onKernelRequest(GetResponseEvent $event)
34+
public function onKernelRequest(ResponseEvent $event)
3535
{
3636
if ($event->isMasterRequest()) {
3737
$this->serverData = $event->getRequest()->server->all();

src/Symfony/Bridge/Monolog/Tests/Processor/RouteProcessorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\HttpFoundation\ParameterBag;
1717
use Symfony\Component\HttpFoundation\Request;
1818
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
19-
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
19+
use Symfony\Component\HttpKernel\Event\RequestEvent;
2020

2121
class RouteProcessorTest extends TestCase
2222
{
@@ -122,9 +122,9 @@ public function testProcessorDoesNothingWhenNoRequest()
122122
$this->assertEquals(['extra' => []], $record);
123123
}
124124

125-
private function mockGetResponseEvent(Request $request): GetResponseEvent
125+
private function mockGetResponseEvent(Request $request): RequestEvent
126126
{
127-
$event = $this->getMockBuilder(GetResponseEvent::class)->disableOriginalConstructor()->getMock();
127+
$event = $this->getMockBuilder(RequestEvent::class)->disableOriginalConstructor()->getMock();
128128
$event->method('getRequest')->willReturn($request);
129129

130130
return $event;

src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use PHPUnit\Framework\TestCase;
1616
use Symfony\Bridge\Monolog\Processor\WebProcessor;
1717
use Symfony\Component\HttpFoundation\Request;
18-
use Symfony\Component\HttpKernel\Event\RequestEvent;
18+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
1919

2020
class WebProcessorTest extends TestCase
2121
{
@@ -88,7 +88,7 @@ private function createRequestEvent($additionalServerParameters = []): array
8888
$request->server->replace($server);
8989
$request->headers->replace($server);
9090

91-
$event = $this->getMockBuilder(RequestEvent::class)
91+
$event = $this->getMockBuilder(ResponseEvent::class)
9292
->disableOriginalConstructor()
9393
->getMock();
9494
$event->expects($this->any())

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ CHANGELOG
44
5.0.0
55
-----
66

7-
* Removed support to load translation resources from the legacy directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`
7+
* Removed support to load translation resources from the legacy directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`
8+
* Remove `ResolveControllerNameSubscriber`
89

910
4.3.0
1011
-----

src/Symfony/Bundle/FrameworkBundle/EventListener/ResolveControllerNameSubscriber.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)