-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
The make: command doesn't run correctly when an entity with annotations has been found. #1212
Comments
Google translation, for my sake and others :)
If you're using PHP 8 and a new enough DoctrineBundle, it should generate attributes, not annotations. If you are using a new project, I would expect that everything would be "new enough" to use attributes. What version of PHP and Symfony are you using?
Do you get an error? |
Hi!
So if you make
Then you DO get an error in this situation? Is this the same error that you posted above in the screenshots? Also, you mentioned:
What command did you run to generate this |
Hi, thank you for your feedback 👍
Yes of course!
The class is generated with the recipe when installing the bundle When I add the attributes in addition to the annotations like this, everything works fine <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken as BaseRefreshToken;
/**
* @ORM\Entity
* @ORM\Table("refresh_tokens")
*/
#[ORM\Entity]
#[ORM\Table('refresh_tokens')]
class RefreshToken extends BaseRefreshToken
{
} |
Moved Comment to Issue #1229 - JR
|
I had the same problem (symfony 5.4 on php 8.1) - in my case I'm using a trait from a bundle in an entity which uses annotations. Its not possible to mix annotations and attributes - annotations will be ignored, if there are attributes. The solution to use the maker-bundle is to have one attribute somewhere in an entity. One attribute is enough to point doctrine to the |
I'm going to go ahead and close this - annotation support was dropped a few releases ago. For help upgrading entities to use attributes, see the comments in #1294 |
Hi
I don't speak english very well, so i write comment in French.
Je travaille sur un nouveau projet avec api-platform. Après avoir mis en place le système d'authentification par le biais de lexik/LexikJWTAuthenticationBundle, j'ai voulu implémenté un système de rafraîchissement de token avec markitosgv/JWTRefreshTokenBundle. Ce bundle génére une entité qui utilise les annotations. Mais cette entité empêche le maker-bundle de fonctionner correctement.
The text was updated successfully, but these errors were encountered: