Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestampable in new Symfony 7 Project throws error on migration #470

Open
GBeushausen opened this issue Feb 11, 2024 · 3 comments
Open
Labels

Comments

@GBeushausen
Copy link

Hi,

i'm trying to add TimeStampableEntity trait to the user Entity in a new Symfony 7 project. After adding the trait i want to create a migration. But it fails with this message:

[Semantical Error] The class "Doctrine\ORM\Mapping\Column" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "Doctrine\ORM\Mapping\Column". If it is indeed no annotation, then you need to add @IgnoreAnnotation("ORM\Column") to the _class_ doc comment of property App\Entity\User::$createdAt.

What can i do to make it work?

@GBeushausen
Copy link
Author

I found out that this project is not compatible with Doctrine 3. Would be great to mention this somewhere.

@stof
Copy link
Owner

stof commented Feb 12, 2024

The trait does not come from this bundle.

And both Symfony 7 and Doctrine 3 removed support for annotations. So I'm wondering what is still trying to read annotations.

@GBeushausen
Copy link
Author

@stof Thanks. Meanwhile i found out that the underlying doctrine-extensions library is not yet compatible with Doctrine 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants