[DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider#20540
Conversation
| Q | A |
|---|---|
| Branch? | 2.8 |
| Bug fix? | yes (but the behavior doesn't change) |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #20514 |
| License | MIT |
| Doc PR | symfony/symfony-docs#5993 (already merged) |
cd3a0fe to
d9f48d7
Compare
d9f48d7 to
80d818f
Compare
| } | ||
|
|
||
| @trigger_error('Implementing loadUserByUsername from Symfony\Component\Security\Core\User\UserProviderInterface is deprecated since version 2.8 and will be removed in 3.0. Implement the Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.', E_USER_DEPRECATED); | ||
| @trigger_error('Having a Doctrine repository implementing Symfony\Component\Security\Core\User\UserProviderInterface for loading users is deprecated since version 2.8 and will not work in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.', E_USER_DEPRECATED); |
There was a problem hiding this comment.
WDYT of:
- Having a Doctrine repository implementing Symfony\Component\Security\Core\User\UserProviderInterface for loading users is deprecated since version 2.8 and will not work in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.
+ Implementing "Symfony\Component\Security\Core\User\UserProviderInterface" in a Doctrine repository is deprecated since version 2.8 and will not work in 3.0. Implement "Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" instead.?
There was a problem hiding this comment.
I thought about implementing in, looks indeed better after reading it :).
About the part you removed, just implementing UserProviderInterface in a doctrine repository is still ok (no matter the why) so I think it would be clearer to mention that the deprecation is only about when using the entity provider. From what you given, what do you think about
Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository for loading users through an entity provider is deprecated since version 2.8 and will not work in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.
?
There was a problem hiding this comment.
The load users could be removed, keeping just that it's only when using the entity provider, but I fail at obtaining the right sentence ^^
There was a problem hiding this comment.
no matter the why
Indeed I've removed this part because it's unlikely to be implemented in another context 😅
But if you consider it's better to keep it, it's fine to me :)
There was a problem hiding this comment.
- Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository for loading users through an entity provider is deprecated since version 2.8 and will not work in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.
+ Implementing Symfony\Component\Security\Core\User\UserProviderInterface in a Doctrine repository used as an entity provider is deprecated since version 2.8 and will not work in 3.0. Make the repository implement Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface instead.?
7f4d4f0 to
ca2a136
Compare
…g UserProviderInterface using the entity provider
ca2a136 to
127af57
Compare
|
👍 |
|
Thank you @chalasr. |
…f implementing UserProviderInterface using the entity provider (chalasr) This PR was merged into the 2.8 branch. Discussion ---------- [DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes (but the behavior doesn't change) | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20514 | License | MIT | Doc PR | symfony/symfony-docs#5993 (already merged) Commits ------- 127af57 [DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider