3131use PDO ;
3232use PHPUnit \Framework \Attributes \DataProvider ;
3333use PHPUnit \Framework \Attributes \IgnoreDeprecations ;
34+ use PHPUnit \Framework \Attributes \RequiresMethod ;
3435use PHPUnit \Framework \TestCase ;
3536use Symfony \Bridge \Doctrine \DependencyInjection \CompilerPass \RegisterEventListenersAndSubscribersPass ;
3637use Symfony \Bundle \DoctrineBundle \Tests \DependencyInjection \TestHydrator ;
@@ -1495,6 +1496,7 @@ public function testDisableSchemaValidation(): void
14951496 }
14961497
14971498 #[IgnoreDeprecations]
1499+ #[RequiresMethod(ProxyHelper::class, 'generateLazyGhost ' )]
14981500 public function testNativeLazyObjectsWithoutConfig (): void
14991501 {
15001502 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1509,10 +1511,6 @@ public function testNativeLazyObjectsWithoutConfig(): void
15091511 self ::markTestSkipped ('This test requires PHP 8.4+ ' );
15101512 }
15111513
1512- if (! method_exists (ProxyHelper::class, 'generateLazyGhost ' )) {
1513- self ::markTestSkipped ('This test requires symfony/var-exporter < 8 ' );
1514- }
1515-
15161514 $ container = $ this ->loadContainer (
15171515 fixture: 'orm_native_lazy_objects_default ' ,
15181516 withMinimalOrmConfig: false ,
@@ -1543,6 +1541,7 @@ public function testNativeLazyObjectsWithConfigTrue(): void
15431541 }
15441542
15451543 #[IgnoreDeprecations]
1544+ #[RequiresMethod(ProxyHelper::class, 'generateLazyGhost ' )]
15461545 public function testNativeLazyObjectsWithConfigFalse (): void
15471546 {
15481547 if (! interface_exists (EntityManagerInterface::class)) {
@@ -1557,10 +1556,6 @@ public function testNativeLazyObjectsWithConfigFalse(): void
15571556 self ::markTestSkipped ('This test requires PHP 8.4+ ' );
15581557 }
15591558
1560- if (! method_exists (ProxyHelper::class, 'generateLazyGhost ' )) {
1561- self ::markTestSkipped ('This test requires symfony/var-exporter < 8 ' );
1562- }
1563-
15641559 $ container = $ this ->loadContainer (
15651560 fixture: 'orm_native_lazy_objects_disable ' ,
15661561 withMinimalOrmConfig: false ,
0 commit comments