Commit fa8d09f
committed
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 provider1 file changed
+4
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 166 | | |
174 | 167 | | |
175 | 168 | | |
| |||
193 | 186 | | |
194 | 187 | | |
195 | 188 | | |
196 | | - | |
197 | | - | |
| 189 | + | |
198 | 190 | | |
199 | 191 | | |
200 | 192 | | |
| |||
258 | 250 | | |
259 | 251 | | |
260 | 252 | | |
261 | | - | |
262 | 253 | | |
263 | 254 | | |
264 | 255 | | |
265 | 256 | | |
266 | 257 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 258 | + | |
270 | 259 | | |
271 | 260 | | |
272 | 261 | | |
| |||
275 | 264 | | |
276 | 265 | | |
277 | 266 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 267 | + | |
282 | 268 | | |
283 | 269 | | |
284 | 270 | | |
| |||
0 commit comments