RequiresAnnotationWithValueToAttributeRector

Change Requires annotations with values to attributes

 use PHPUnit\Framework\TestCase;

-/**
- * @requires PHP > 8.4
- * @requires PHPUnit >= 10
- */
-
+#[\PHPUnit\Framework\Attributes\RequiresPhp('> 8.4')]
+#[\PHPUnit\Framework\Attributes\RequiresPhpunit('>= 10')]
 final class SomeTest extends TestCase
 {
-    /**
-     * @requires setting date.timezone Europe/Berlin
-     */
+    #[\PHPUnit\Framework\Attributes\RequiresSetting('date.timezone', 'Europe/Berlin')]
     public function test()
     {
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\RequiresAnnotationWithValueToAttributeRector;

return RectorConfig::configure()
    ->withRules([
        RequiresAnnotationWithValueToAttributeRector::class,
    ]);