From 8d84ac34a5c1f650c337924e260dcf397f816111 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 18 Nov 2019 08:44:14 +0100 Subject: [PATCH] Remove wrong @group legacy annotations --- .../Tests/DependencyInjection/ConfigurationTest.php | 2 -- .../Tests/DependencyInjection/WebProfilerExtensionTest.php | 2 -- src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php | 3 --- src/Symfony/Component/Routing/Loader/ObjectLoader.php | 2 +- .../Component/Routing/Tests/Loader/ObjectLoaderTest.php | 5 +---- .../Provider/DaoAuthenticationProviderTest.php | 3 --- .../Provider/UserAuthenticationProviderTest.php | 3 --- .../Security/Http/Tests/Firewall/ExceptionListenerTest.php | 3 --- .../Security/Http/Tests/Firewall/LogoutListenerTest.php | 3 --- .../Http/Tests/RememberMe/AbstractRememberMeServicesTest.php | 3 --- src/Symfony/Component/Workflow/Tests/WorkflowTest.php | 3 --- 11 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php index 06aa85aee3..a0bc7f43c0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -60,8 +60,6 @@ class ConfigurationTest extends TestCase } /** - * @group legacy - * * @dataProvider getInterceptRedirectsConfiguration */ public function testConfigTreeUsingInterceptRedirects(bool $interceptRedirects, array $expectedResult) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php index b94ef8045b..6c6fc7f0b4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php @@ -142,8 +142,6 @@ class WebProfilerExtensionTest extends TestCase } /** - * @group legacy - * * @dataProvider getInterceptRedirectsToolbarConfig */ public function testToolbarConfigUsingInterceptRedirects( diff --git a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php index 46dcee2162..be03734dc4 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -28,9 +28,6 @@ class BundleTest extends TestCase ); } - /** - * @group legacy - */ public function testGetContainerExtensionWithInvalidClass() { $this->expectException('LogicException'); diff --git a/src/Symfony/Component/Routing/Loader/ObjectLoader.php b/src/Symfony/Component/Routing/Loader/ObjectLoader.php index e7d9efa1eb..c391ad6648 100644 --- a/src/Symfony/Component/Routing/Loader/ObjectLoader.php +++ b/src/Symfony/Component/Routing/Loader/ObjectLoader.php @@ -52,7 +52,7 @@ abstract class ObjectLoader extends Loader $loaderObject = $this->getObject($parts[0]); if (!\is_object($loaderObject)) { - throw new \LogicException(sprintf('%s:getObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject))); + throw new \TypeError(sprintf('%s:getObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject))); } if (!\is_callable([$loaderObject, $method])) { diff --git a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php index cec1fa422c..2a7f21bd16 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/ObjectLoaderTest.php @@ -62,12 +62,9 @@ class ObjectLoaderTest extends TestCase ]; } - /** - * @group legacy - */ public function testExceptionOnNoObjectReturned() { - $this->expectException('LogicException'); + $this->expectException(\TypeError::class); $loader = new TestObjectLoader(); $loader->loaderMap = ['my_service' => 'NOT_AN_OBJECT']; $loader->load('my_service::method'); diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php index 342db15095..0981b13c8f 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -22,9 +22,6 @@ use Symfony\Component\Security\Core\User\UserProviderInterface; class DaoAuthenticationProviderTest extends TestCase { - /** - * @group legacy - */ public function testRetrieveUserWhenProviderDoesNotReturnAnUserInterface() { $this->expectException('Symfony\Component\Security\Core\Exception\AuthenticationServiceException'); diff --git a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php index 5a42b3290f..8ec92d5014 100644 --- a/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -62,9 +62,6 @@ class UserAuthenticationProviderTest extends TestCase $provider->authenticate($this->getSupportedToken()); } - /** - * @group legacy - */ public function testAuthenticateWhenProviderDoesNotReturnAnUserInterface() { $this->expectException('Symfony\Component\Security\Core\Exception\AuthenticationServiceException'); diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php index fb1db91428..2715c9404d 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php @@ -72,9 +72,6 @@ class ExceptionListenerTest extends TestCase ]; } - /** - * @group legacy - */ public function testExceptionWhenEntryPointReturnsBadValue() { $event = $this->createEvent(new AuthenticationException()); diff --git a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php index 5eed093928..3d51a26196 100644 --- a/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php @@ -123,9 +123,6 @@ class LogoutListenerTest extends TestCase $listener($event); } - /** - * @group legacy - */ public function testSuccessHandlerReturnsNonResponse() { $this->expectException('RuntimeException'); diff --git a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php index 8dc2042f12..c476e65403 100644 --- a/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php @@ -39,9 +39,6 @@ class AbstractRememberMeServicesTest extends TestCase $this->assertNull($service->autoLogin(new Request())); } - /** - * @group legacy - */ public function testAutoLoginThrowsExceptionWhenImplementationDoesNotReturnUserInterface() { $this->expectException('RuntimeException'); diff --git a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php index 84d02a970d..54b26421f7 100644 --- a/src/Symfony/Component/Workflow/Tests/WorkflowTest.php +++ b/src/Symfony/Component/Workflow/Tests/WorkflowTest.php @@ -20,9 +20,6 @@ class WorkflowTest extends TestCase { use WorkflowBuilderTrait; - /** - * @group legacy - */ public function testGetMarkingWithInvalidStoreReturn() { $this->expectException('Symfony\Component\Workflow\Exception\LogicException');