Closed Gemorroj closed 2 years ago
@Gemorroj
Two possible solutions. Use 7.4.0
because it is the last version which supports annotations.
Version 7.5.0
uses attributes, so you can change it to
/**
* @var string
* @ORM\Column(type="feature", length=255, nullable=false)
*/
#[DoctrineAssert\Enum(entity: FeatureType::class)]
private $code;
I think we should support both variants (attribute/annotation) in current branches. If we remove support annotation, we should make new major branch. Like 9.x
OK, I will rethink about it
I think we should support both variants (attribute/annotation) in current branches. If we remove support annotation, we should make new major branch. Like 9.x
I agree. Changing major dependency requirements (e.g. php7 vs. php 8+) should require a major version change in your library.
I was thinking about correct restoring. So in 7.5 and 8.1 Enum constraint as annotation will be restored, but will be removed in 9.0. Enum as attribute will be kept in both branches but renamed into EnumType. So you can still use old variant
@DoctrineAssert\Enum(entity="App\DBAL\Types\BasketballPositionType")
or switch to the new one
#[DoctrineAssert\EnumType(entity: BasketballPositionType::class)]
Two classes were introduced because it would be hard and dirty to support annotation and attribute processing in one file. They have different syntax.
7.5.1 and 8.1.1 releases will include this fix
Hi. release v7.5.0
but there is no such error in release v7.4.0