2727use InvalidArgumentException ;
2828use LogicException ;
2929use PDO ;
30+ use PHPUnit \Framework \Attributes \DataProvider ;
31+ use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
3032use PHPUnit \Framework \TestCase ;
3133use Symfony \Bridge \Doctrine \DependencyInjection \CompilerPass \RegisterEventListenersAndSubscribersPass ;
3234use Symfony \Bundle \DoctrineBundle \Tests \DependencyInjection \TestHydrator ;
@@ -146,7 +148,7 @@ public function testDbalLoadFromXmlSingleConnections(): void
146148 $ this ->assertEquals ('9.4.0 ' , $ config ['serverVersion ' ]);
147149 }
148150
149- /** @group legacy */
151+ #[WithoutErrorHandler]
150152 public function testDbalLoadUrlOverride (): void
151153 {
152154 $ container = $ this ->loadContainer ('dbal_allow_url_override ' );
@@ -167,7 +169,7 @@ public function testDbalLoadUrlOverride(): void
167169 $ this ->assertFalse (isset ($ config ['override_url ' ]));
168170 }
169171
170- /** @group legacy */
172+ #[WithoutErrorHandler]
171173 public function testDbalLoadPartialUrlOverrideSetsDefaults (): void
172174 {
173175 $ container = $ this ->loadContainer ('dbal_allow_partial_url_override ' );
@@ -281,7 +283,7 @@ public function testDbalLoadDisableTypeComments(): void
281283 $ this ->assertCount (0 , $ calls );
282284 }
283285
284- /** @group legacy */
286+ #[WithoutErrorHandler]
285287 public function testDbalSchemaManagerFactory (): void
286288 {
287289 $ container = $ this ->loadContainer ('dbal_schema_manager_factory ' );
@@ -702,10 +704,8 @@ public function testSetTypedFieldMapper(): void
702704 $ this ->assertDICDefinitionMethodCallOnce ($ definition , 'setTypedFieldMapper ' , [0 => new Reference ('doctrine.orm.typed_field_mapper.default ' )]);
703705 }
704706
705- /**
706- * @dataProvider cacheConfigProvider
707- * @group legacy
708- */
707+ #[DataProvider('cacheConfigProvider ' )]
708+ #[WithoutErrorHandler]
709709 public function testCacheConfig (string |null $ expectedClass , string $ entityManagerName , string |null $ cacheGetter ): void
710710 {
711711 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1183,7 +1183,7 @@ public function testDbalSchemaFilterNewConfig(): void
11831183 }
11841184 }
11851185
1186- /** @group legacy */
1186+ #[WithoutErrorHandler]
11871187 public function testWellKnownSchemaFilterDefaultTables (): void
11881188 {
11891189 $ container = $ this ->getContainer ([]);
@@ -1206,7 +1206,7 @@ public function testWellKnownSchemaFilterDefaultTables(): void
12061206 $ this ->assertTrue ($ filter ->__invoke ('anything_else ' ));
12071207 }
12081208
1209- /** @group legacy */
1209+ #[WithoutErrorHandler]
12101210 public function testWellKnownSchemaFilterOverriddenTables (): void
12111211 {
12121212 $ container = $ this ->getContainer ([]);
@@ -1444,7 +1444,7 @@ public function testDisableSchemaValidation(): void
14441444 $ this ->assertFalse ($ collectorDefinition ->getArguments ()[1 ]);
14451445 }
14461446
1447- /** @group legacy */
1447+ #[WithoutErrorHandler]
14481448 public function testNativeLazyObjectsWithoutConfig (): void
14491449 {
14501450 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1485,7 +1485,7 @@ public function testNativeLazyObjectsWithConfigTrue(): void
14851485 $ this ->assertTrue ($ entityManager ->getConfiguration ()->isNativeLazyObjectsEnabled ());
14861486 }
14871487
1488- /** @group legacy */
1488+ #[WithoutErrorHandler]
14891489 public function testNativeLazyObjectsWithConfigFalse (): void
14901490 {
14911491 if (! interface_exists (EntityManagerInterface::class)) {
0 commit comments