1717use Generator ;
1818use InvalidArgumentException ;
1919use PDO ;
20+ use PHPUnit \Framework \Attributes \DataProvider ;
21+ use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
2022use PHPUnit \Framework \TestCase ;
2123use Symfony \Bridge \Doctrine \DependencyInjection \CompilerPass \RegisterEventListenersAndSubscribersPass ;
2224use Symfony \Bundle \DoctrineBundle \Tests \DependencyInjection \TestHydrator ;
@@ -203,7 +205,7 @@ public function testDbalLoadDisableTypeComments(): void
203205 $ this ->assertCount (0 , $ calls );
204206 }
205207
206- /** @group legacy */
208+ #[WithoutErrorHandler]
207209 public function testDbalSchemaManagerFactory (): void
208210 {
209211 $ container = $ this ->loadContainer ('dbal_schema_manager_factory ' );
@@ -623,10 +625,8 @@ public function testSetTypedFieldMapper(): void
623625 $ this ->assertDICDefinitionMethodCallOnce ($ definition , 'setTypedFieldMapper ' , [0 => new Reference ('doctrine.orm.typed_field_mapper.default ' )]);
624626 }
625627
626- /**
627- * @dataProvider cacheConfigProvider
628- * @group legacy
629- */
628+ #[DataProvider('cacheConfigProvider ' )]
629+ #[WithoutErrorHandler]
630630 public function testCacheConfig (string |null $ expectedClass , string $ entityManagerName , string |null $ cacheGetter ): void
631631 {
632632 if (! interface_exists (EntityManagerInterface::class)) {
@@ -990,7 +990,7 @@ public function testDbalSchemaFilterNewConfig(): void
990990 }
991991 }
992992
993- /** @group legacy */
993+ #[WithoutErrorHandler]
994994 public function testWellKnownSchemaFilterDefaultTables (): void
995995 {
996996 $ container = $ this ->getContainer ([]);
@@ -1013,7 +1013,7 @@ public function testWellKnownSchemaFilterDefaultTables(): void
10131013 $ this ->assertTrue ($ filter ->__invoke ('anything_else ' ));
10141014 }
10151015
1016- /** @group legacy */
1016+ #[WithoutErrorHandler]
10171017 public function testWellKnownSchemaFilterOverriddenTables (): void
10181018 {
10191019 $ container = $ this ->getContainer ([]);
@@ -1251,7 +1251,6 @@ public function testDisableSchemaValidation(): void
12511251 $ this ->assertFalse ($ collectorDefinition ->getArguments ()[1 ]);
12521252 }
12531253
1254- /** @group legacy */
12551254 public function testNativeLazyObjectsWithoutConfig (): void
12561255 {
12571256 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1276,7 +1275,6 @@ public function testNativeLazyObjectsWithConfigTrue(): void
12761275 $ this ->assertTrue ($ entityManager ->getConfiguration ()->isNativeLazyObjectsEnabled ());
12771276 }
12781277
1279- /** @group legacy */
12801278 public function testNativeLazyObjectsWithConfigFalse (): void
12811279 {
12821280 if (! interface_exists (EntityManagerInterface::class)) {
0 commit comments