Configurable
UploadedFileConstraintArrayOptionsToNamedArgsRector
Replace the deprecated options-array argument of UploadedFileConstraint with named constructor arguments.
-$constraint = new UploadedFileConstraint(['maxSize' => 1024000]);
+$constraint = new UploadedFileConstraint(maxSize: 1024000);
Configure your rector.php:
<?php
use DrupalRector\Drupal11\Rector\Deprecation\UploadedFileConstraintArrayOptionsToNamedArgsRector;
use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withConfiguredRule(UploadedFileConstraintArrayOptionsToNamedArgsRector::class, [
new DrupalIntroducedVersionConfiguration('11.4.0'),
]);