You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #6931 [Guard] Improve clarity using the configured provider (chalasr)
This PR was merged into the 2.8 branch.
Discussion
----------
[Guard] Improve clarity using the configured provider
Recently at work, a colleague trying to discover Guard said me how it was confused by the given example:
> Does Guard require to configure an user provider, or can I simply inject the entity manager? Otherwise, what is the point of configuring this provider?
I think I understand why this example was made as is, showing the flexibility of Guard and its ability to answer different needs in different authentication ways without going deeper into things that are already documented somewhere else.
On the other hand I can understand it's confusing and IMHO remove the use of the entity manager can make it clearer and easier to understand.
Note that the current example shouldn't work as is, as don't set the `property` key of an entity provider involves to create a doctrine repository implementing `UserLoaderInterface` for the corresponding `User` entity (if the provider comes to be used of course).
What do you think?
ping @weaverryan
Commits
-------
456dc05 [Guard] Improve clarity using the configured provider
0 commit comments