You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I run the rector.php to migrate annotations to attributes on a symfony 5.4 project and this issue occured in
AttributeReader.php line 115 :
Attribute "Doctrine\ORM\Mapping\Entity" must not be repeated
I don't know how to fix it.
Do you know what is the origin of this error?
This is the rector.php file created for migration :
`<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\Set\SymfonySetList;
return function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
// DIR . '/src/Entity', DIR . '/config', DIR . '/public', DIR . '/src', DIR . '/tests',
]);
$rectorConfig->sets([
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
\Rector\Symfony\Set\SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
\Rector\Symfony\Set\SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->ruleWithConfiguration(AnnotationToAttributeRector::class, [
new AnnotationToAttribute(\Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity::class),
new AnnotationToAttribute(\Ibericode\Vat\Bundle\Validator\Constraints\VatNumber::class),
]);
};
`
The text was updated successfully, but these errors were encountered:
Hi,
I run the rector.php to migrate annotations to attributes on a symfony 5.4 project and this issue occured in
AttributeReader.php line 115 :
Attribute "Doctrine\ORM\Mapping\Entity" must not be repeated
I don't know how to fix it.
Do you know what is the origin of this error?
This is the rector.php file created for migration :
`<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\Set\SymfonySetList;
return function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
// DIR . '/src/Entity',
DIR . '/config',
DIR . '/public',
DIR . '/src',
DIR . '/tests',
]);
$rectorConfig->sets([
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
\Rector\Symfony\Set\SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
\Rector\Symfony\Set\SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->ruleWithConfiguration(AnnotationToAttributeRector::class, [
new AnnotationToAttribute(\Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity::class),
new AnnotationToAttribute(\Ibericode\Vat\Bundle\Validator\Constraints\VatNumber::class),
]);
};
`
The text was updated successfully, but these errors were encountered: