ExplicitAttributeNamedArgsRector

Convert positional arguments on attributes into named arguments, using the attribute constructor parameter names

-#[SomeAttribute(SomeClass::class, null, ['home'])]
+#[SomeAttribute(value: SomeClass::class, only: null, except: ['home'])]
 class SomeClass
 {
 }

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\Attribute\ExplicitAttributeNamedArgsRector;
use Rector\Config\RectorConfig;

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