Turns old Constraint::$errorNames properties to use Constraint::ERROR_NAMES instead
use Symfony\Component\Validator\Constraints\NotBlank;
class SomeClass
{
- NotBlank::$errorNames
+ NotBlank::ERROR_NAMES
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony61\Rector\StaticPropertyFetch\ErrorNamesPropertyToConstantRector;
return RectorConfig::configure()
->withRules([
ErrorNamesPropertyToConstantRector::class,
]);