Open KDederichs opened 11 months ago
Can https://www.doctrine-project.org/projects/doctrine-orm/en/2.17/reference/inheritance-mapping.html#attribute-override be used to re-configure what would basically be the #[ORM\GeneratedValue]
attribute?
If not, the other sane option I can think of would be to have your entity class directly extend from Gesdinet\JWTRefreshTokenBundle\Model\AbstractRefreshToken
, but, that would also mean you'd have to implement the full entity mapping since the provided mapping only targets Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken
and its subclasses.
Or, if all of that is too much to deal with, just ignore the deprecation for now since it's not easily fixed on your side (the DoctrineBundle is also missing a way to configure that $configuration->setIdentityGenerationPreferences()
bit, so going to the bundle config to change things that way isn't an option right now without a compiler pass or something along those lines).
Ok, I decided to do the Gesdinet\JWTRefreshTokenBundle\Model\AbstractRefreshToken
method but fun fact:
While it works it doesn't get rid of the deprecation.
Since I use it in an API-Platform project I assume it's the same issue as the one where it tells me to not use Gesdinet\JWTRefreshTokenBundle\Entity\AbstractRefreshToken
?
I don't use API Platform so I have no idea if there's something in there that could cause that deprecation or not. You might have to get a back trace to figure out what models are triggering that deprecation (the method that emits the deprecation is called by another method that has a ClassMetadataInfo
object, so a combo of that stack trace plus dumping $class->getName()
should help point you in the right direction).
Hey,
for a while now doctrine is throwing this deprecation at me:
which is caused by the AUTO ID mapping of the refresh token.
When trying to change it though I'll just get a mapping exception though:
since you apparently can't overwrite a bundle mapping with an attribute...
Any idea on how to best handle this?