Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commitf9bb4ab
committed
feature#19452 Remove the new SecurityUserValueResolver (weaverryan)
This PR was merged into the 3.2-dev branch.Discussion----------Remove the new SecurityUserValueResolver| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no (the feature hasn't been released yet)| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aHi guys!This is a revert for#18510 (ping@iltar), which is a nice idea, but will have some big practical implications:1) You are only allowed to type-hint the argument with `UserInterface` exactly. For the 90% of Symfony project's that user a User entity for their User, this will be weird: I'll receive a `UserInterface`, that immediately call methods on it that aren't in the interface (and also, your IDE won't give you auto-completion). And as#18510 mentions, we can't allow people to type-hint their concrete `User` class, because this will conflict with SensioFWExtraBundle ParamConverter if there is a user id in the URL2) Deprecating and removing `$this->getUser()` in a controller is a step back. Where we can, let's make controllers and services act *more* like each other. You can't call `$this->getUser()` in a service, but at least if you look at this method in `Controller`, you can see that it uses `security.token_storage` - which is how you will get the User object if you need it from within services.Sorry for being late on this original issue! It looked good to me at first :).Cheers!Commits-------da7daee Removing the Controller::getUser() deprecationFile tree
5 files changed
+0
-22
lines changed- src/Symfony/Bundle/FrameworkBundle
- Controller
- Tests/Controller
5 files changed
+0
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
367 | 366 | | |
368 | 367 | | |
369 | 368 | | |
370 | | - | |
371 | | - | |
372 | 369 | | |
373 | 370 | | |
374 | 371 | | |
375 | 372 | | |
376 | 373 | | |
377 | 374 | | |
378 | | - | |
379 | | - | |
380 | 375 | | |
381 | 376 | | |
382 | 377 | | |
| |||
Lines changed: 0 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 70 | | |
77 | 71 | | |
78 | 72 | | |
| |||
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
| |||
95 | 86 | | |
96 | 87 | | |
97 | 88 | | |
98 | | - | |
99 | 89 | | |
100 | 90 | | |
101 | 91 | | |
| |||
0 commit comments
Comments
(0)