Commit f885ecd
committed
bug #40758 [Security] NullToken signature (jderusse)
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] NullToken signature
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The signature of `TokenInterface::getUser` does not allow returning null. But `NullToken` returns `null`.
https://github.com/symfony/symfony/blob/0f96ac74847d114c9d9679655bcf3e94b6ba69d1/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php#L49-L56
This PR update `NullToken::getUser` to return an empty string instead of null.
I wonder if the fix shouldn't be to change the return type in the interface, but that would be a BC break, right?
Commits
-------
9ad3720efc [security] NullToken signature1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments