Commit 3e3651e
committed
bug #469 Fixed make:auth when using a custom repository method as UserProvider (romaricdrigon)
This PR was merged into the 1.0-dev branch.
Discussion
----------
Fixed make:auth when using a custom repository method as UserProvider
Hello,
It is possible in vanilla Symfony to change how the User is retrieved by the `entity` user provider, so you use your own repository - [https://symfony.com/doc/current/security/user_provider.html#using-a-custom-query-to-load-the-user](https://symfony.com/doc/current/security/user_provider.html#using-a-custom-query-to-load-the-user). Then you remove `providers.xxxx.entity.property` key.
Unfortunately, it causes `make:auth` command to crash:

This PR patches `InteractiveSecurityHelper`, so it checks `property` key exists before reading from it. No BC break.
I added a test for that very specific use case.
Commits
-------
7014d93 Fixed make:auth when using a custom repository method as UserProviderFile tree
3 files changed
+10
-1
lines changed- src/Security
- tests
- Maker
- Security
3 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
| 442 | + | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
| |||
0 commit comments