Rename getBlockPrefix()
if it returns the default value - class to underscore, e.g. UserFormType = user_form
use Symfony\Component\Form\AbstractType;
class TaskType extends AbstractType
{
- public function getBlockPrefix()
- {
- return 'task';
- }
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony30\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
return RectorConfig::configure()
->withRules([
RemoveDefaultGetBlockPrefixRector::class,
]);