Add Rector Rule to inject normalization methods into export classes

This update introduces a Rector rule to automatically add `normalizeFormData`, `denormalizeFormData`, and `getNormalizationVersion` methods to export-related classes implementing specific interfaces. It ensures consistency and reduces manual work by leveraging traits and default implementations for normalizing form data. Test fixtures and configurations are included to validate and support this functionality.
This commit is contained in:
2025-03-11 15:08:48 +01:00
parent 229f9b7125
commit e69b679938
7 changed files with 586 additions and 2 deletions

View File

@@ -85,10 +85,8 @@ return static function (RectorConfig $rectorConfig): void {
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency'),
new \Rector\Php80\ValueObject\AnnotationToAttribute('Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation'),
]);
*/
// upgrade config for rector
$rectorConfig->rules([\Rector\Transform\Rector\FileWithoutNamespace\RectorConfigBuilderRector::class]);
// upgrade of chill exports
};