Run Rector on your code to see what it can do for you:

 <?php
 
 declare(strict_types=1);
 use PHPUnit\Framework\TestCase;
 final class RectorTest extends TestCase
 {
-	/**
-	 * @BruteForceProtection(action=login)
-	 */
+	#[\OCP\AppFramework\Http\Attribute\BruteForceProtection]
     public function testMethod() {
     }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 38d1ca - released at 2026-01-19 23:17