2626use InvalidArgumentException ;
2727use LogicException ;
2828use PDO ;
29+ use PHPUnit \Framework \Attributes \DataProvider ;
30+ use PHPUnit \Framework \Attributes \WithoutErrorHandler ;
2931use PHPUnit \Framework \TestCase ;
3032use Symfony \Bridge \Doctrine \DependencyInjection \CompilerPass \RegisterEventListenersAndSubscribersPass ;
3133use Symfony \Bundle \DoctrineBundle \Tests \DependencyInjection \TestHydrator ;
@@ -143,7 +145,7 @@ public function testDbalLoadFromXmlSingleConnections(): void
143145 $ this ->assertEquals ('9.4.0 ' , $ config ['serverVersion ' ]);
144146 }
145147
146- /** @group legacy */
148+ #[WithoutErrorHandler]
147149 public function testDbalLoadUrlOverride (): void
148150 {
149151 $ container = $ this ->loadContainer ('dbal_allow_url_override ' );
@@ -164,7 +166,7 @@ public function testDbalLoadUrlOverride(): void
164166 $ this ->assertFalse (isset ($ config ['override_url ' ]));
165167 }
166168
167- /** @group legacy */
169+ #[WithoutErrorHandler]
168170 public function testDbalLoadPartialUrlOverrideSetsDefaults (): void
169171 {
170172 $ container = $ this ->loadContainer ('dbal_allow_partial_url_override ' );
@@ -278,7 +280,7 @@ public function testDbalLoadDisableTypeComments(): void
278280 $ this ->assertCount (0 , $ calls );
279281 }
280282
281- /** @group legacy */
283+ #[WithoutErrorHandler]
282284 public function testDbalSchemaManagerFactory (): void
283285 {
284286 $ container = $ this ->loadContainer ('dbal_schema_manager_factory ' );
@@ -717,10 +719,8 @@ public function testSetTypedFieldMapper(): void
717719 $ this ->assertDICDefinitionMethodCallOnce ($ definition , 'setTypedFieldMapper ' , [0 => new Reference ('doctrine.orm.typed_field_mapper.default ' )]);
718720 }
719721
720- /**
721- * @dataProvider cacheConfigProvider
722- * @group legacy
723- */
722+ #[DataProvider('cacheConfigProvider ' )]
723+ #[WithoutErrorHandler]
724724 public function testCacheConfig (string |null $ expectedClass , string $ entityManagerName , string |null $ cacheGetter ): void
725725 {
726726 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1168,7 +1168,7 @@ public function testDbalSchemaFilterNewConfig(): void
11681168 }
11691169 }
11701170
1171- /** @group legacy */
1171+ #[WithoutErrorHandler]
11721172 public function testWellKnownSchemaFilterDefaultTables (): void
11731173 {
11741174 $ container = $ this ->getContainer ([]);
@@ -1191,7 +1191,7 @@ public function testWellKnownSchemaFilterDefaultTables(): void
11911191 $ this ->assertTrue ($ filter ->__invoke ('anything_else ' ));
11921192 }
11931193
1194- /** @group legacy */
1194+ #[WithoutErrorHandler]
11951195 public function testWellKnownSchemaFilterOverriddenTables (): void
11961196 {
11971197 $ container = $ this ->getContainer ([]);
@@ -1429,7 +1429,7 @@ public function testDisableSchemaValidation(): void
14291429 $ this ->assertFalse ($ collectorDefinition ->getArguments ()[1 ]);
14301430 }
14311431
1432- /** @group legacy */
1432+ #[WithoutErrorHandler]
14331433 public function testNativeLazyObjectsWithoutConfig (): void
14341434 {
14351435 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1470,7 +1470,7 @@ public function testNativeLazyObjectsWithConfigTrue(): void
14701470 $ this ->assertTrue ($ entityManager ->getConfiguration ()->isNativeLazyObjectsEnabled ());
14711471 }
14721472
1473- /** @group legacy */
1473+ #[WithoutErrorHandler]
14741474 public function testNativeLazyObjectsWithConfigFalse (): void
14751475 {
14761476 if (! interface_exists (EntityManagerInterface::class)) {
0 commit comments