1111
1212namespace Symfony \Component \VarExporter \Tests ;
1313
14+ use PHPUnit \Framework \Attributes \DataProvider ;
1415use PHPUnit \Framework \Attributes \Group ;
1516use PHPUnit \Framework \Attributes \IgnoreDeprecations ;
17+ use PHPUnit \Framework \Attributes \RequiresPhp ;
1618use PHPUnit \Framework \TestCase ;
1719use Symfony \Component \Serializer \Mapping \Factory \ClassMetadataFactory ;
1820use Symfony \Component \Serializer \Mapping \Loader \AttributeLoader ;
@@ -140,9 +142,7 @@ public function testSerialize()
140142 $ this ->assertTrue ($ clone ->isLazyObjectInitialized ());
141143 }
142144
143- /**
144- * @dataProvider provideMagicClass
145- */
145+ #[DataProvider('provideMagicClass ' )]
146146 public function testMagicClass (MagicClass $ instance )
147147 {
148148 $ this ->assertSame ('bar ' , $ instance ->foo );
@@ -242,9 +242,7 @@ public function testIndirectModification()
242242 $ this ->assertSame ([123 ], $ proxy ->foo );
243243 }
244244
245- /**
246- * @requires PHP 8.3
247- */
245+ #[RequiresPhp('8.3 ' )]
248246 public function testReadOnlyClass ()
249247 {
250248 $ proxy = $ this ->createLazyGhost (ReadOnlyClass::class, fn ($ proxy ) => $ proxy ->__construct (123 ));
@@ -298,9 +296,7 @@ public function testReinitLazyGhost()
298296 $ this ->assertSame (3 , $ object ->public );
299297 }
300298
301- /**
302- * @requires PHP 8.4
303- */
299+ #[RequiresPhp('8.4 ' )]
304300 public function testPropertyHooks ()
305301 {
306302 $ initialized = false ;
@@ -323,9 +319,7 @@ public function testPropertyHooks()
323319 $ this ->assertSame (345 , $ object ->backed );
324320 }
325321
326- /**
327- * @requires PHP 8.4
328- */
322+ #[RequiresPhp('8.4 ' )]
329323 public function testPropertyHooksWithDefaultValue ()
330324 {
331325 $ initialized = false ;
@@ -351,9 +345,7 @@ public function testPropertyHooksWithDefaultValue()
351345 $ this ->assertTrue ($ object ->backedBoolWithDefault );
352346 }
353347
354- /**
355- * @requires PHP 8.4
356- */
348+ #[RequiresPhp('8.4 ' )]
357349 public function testAsymmetricVisibility ()
358350 {
359351 $ object = $ this ->createLazyGhost (AsymmetricVisibility::class, function ($ instance ) {
0 commit comments