Skip to content

Commit f5b405b

Browse files
committed
minor #13206 [2.3] Cleanup deprecations (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Cleanup deprecations | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | let's see | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- d649bef [2.3] Remove useless tests skips 1d68ad3 [2.3] Cleanup deprecations
2 parents f56fc97 + cc4b820 commit f5b405b

37 files changed

+10
-268
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CHANGELOG
66

77
* [BC BREAK] renamed `Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener` to `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener` and changed its constructor
88
* deprecated `Symfony\Component\HttpKernel\Debug\ErrorHandler`, `Symfony\Component\HttpKernel\Debug\ExceptionHandler`,
9-
`Symfony\Component\HttpKernel\Exception\FatalErrorException`, and `Symfony\Component\HttpKernel\Exception\FlattenException`
9+
`Symfony\Component\HttpKernel\Exception\FatalErrorException` and `Symfony\Component\HttpKernel\Exception\FlattenException`
1010
* deprecated `Symfony\Component\HttpKernel\Kernel::init()``
1111
* added the possibility to specify an id an extra attributes to hinclude tags
1212
* added the collect of data if a controller is a Closure in the Request collector

DataCollector/ExceptionDataCollector.php

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

1212
namespace Symfony\Component\HttpKernel\DataCollector;
1313

14+
use Symfony\Component\Debug\Exception\FlattenException;
1415
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpFoundation\Response;
16-
use Symfony\Component\HttpKernel\Exception\FlattenException;
1717

1818
/**
1919
* ExceptionDataCollector.

DataCollector/LoggerDataCollector.php

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

1212
namespace Symfony\Component\HttpKernel\DataCollector;
1313

14+
use Symfony\Component\Debug\ErrorHandler;
1415
use Symfony\Component\HttpFoundation\Request;
15-
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
1616
use Symfony\Component\HttpFoundation\Response;
1717
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
1818

EventListener/ErrorsLoggerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

1414
use Psr\Log\LoggerInterface;
15-
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
15+
use Symfony\Component\Debug\ErrorHandler;
1616
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1717
use Symfony\Component\HttpKernel\KernelEvents;
1818

EventListener/ExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

1414
use Psr\Log\LoggerInterface;
15+
use Symfony\Component\Debug\Exception\FlattenException;
1516
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
1617
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
1718
use Symfony\Component\HttpKernel\KernelEvents;
1819
use Symfony\Component\HttpKernel\HttpKernelInterface;
19-
use Symfony\Component\HttpKernel\Exception\FlattenException;
2020
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
2121
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
2222

Exception/FatalErrorException.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111

1212
namespace Symfony\Component\HttpKernel\Exception;
1313

14-
use Symfony\Component\Debug\Exception\FatalErrorException as DebugFatalErrorException;
15-
1614
/**
1715
* Fatal Error Exception.
1816
*
1917
* @author Konstanton Myakshin <koc-dp@yandex.ru>
2018
*
2119
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
2220
*/
23-
class FatalErrorException extends DebugFatalErrorException
24-
{
25-
}
21+
class_exists('Symfony\Component\Debug\Exception\FatalErrorException');

Exception/FlattenException.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
namespace Symfony\Component\HttpKernel\Exception;
1313

14-
use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException;
15-
1614
/**
1715
* FlattenException wraps a PHP Exception to be able to serialize it.
1816
*
@@ -22,6 +20,4 @@
2220
*
2321
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
2422
*/
25-
class FlattenException extends DebugFlattenException
26-
{
27-
}
23+
class_exists('Symfony\Component\Debug\Exception\FlattenException');

Tests/Bundle/BundleTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ class BundleTest extends \PHPUnit_Framework_TestCase
1919
{
2020
public function testRegisterCommands()
2121
{
22-
if (!class_exists('Symfony\Component\Console\Application')) {
23-
$this->markTestSkipped('The "Console" component is not available');
24-
}
25-
26-
if (!interface_exists('Symfony\Component\DependencyInjection\ContainerAwareInterface')) {
27-
$this->markTestSkipped('The "DependencyInjection" component is not available');
28-
}
29-
30-
if (!class_exists('Symfony\Component\Finder\Finder')) {
31-
$this->markTestSkipped('The "Finder" component is not available');
32-
}
33-
3422
$cmd = new FooCommand();
3523
$app = $this->getMock('Symfony\Component\Console\Application');
3624
$app->expects($this->once())->method('add')->with($this->equalTo($cmd));

Tests/ClientTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020

2121
class ClientTest extends \PHPUnit_Framework_TestCase
2222
{
23-
protected function setUp()
24-
{
25-
if (!class_exists('Symfony\Component\BrowserKit\Client')) {
26-
$this->markTestSkipped('The "BrowserKit" component is not available');
27-
}
28-
}
29-
3023
public function testDoRequest()
3124
{
3225
$client = new Client(new TestHttpKernel());
@@ -48,14 +41,6 @@ public function testDoRequest()
4841

4942
public function testGetScript()
5043
{
51-
if (!class_exists('Symfony\Component\Process\Process')) {
52-
$this->markTestSkipped('The "Process" component is not available');
53-
}
54-
55-
if (!class_exists('Symfony\Component\ClassLoader\ClassLoader')) {
56-
$this->markTestSkipped('The "ClassLoader" component is not available');
57-
}
58-
5944
$client = new TestClient(new TestHttpKernel());
6045
$client->insulate();
6146
$client->request('GET', '/');

Tests/Controller/ControllerResolverTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616

1717
class ControllerResolverTest extends \PHPUnit_Framework_TestCase
1818
{
19-
protected function setUp()
20-
{
21-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
22-
$this->markTestSkipped('The "HttpFoundation" component is not available');
23-
}
24-
}
25-
2619
public function testGetControllerWithoutControllerParameter()
2720
{
2821
$logger = $this->getMock('Psr\Log\LoggerInterface');

0 commit comments

Comments
 (0)