Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
More return type fixes (bis)#42490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedAug 11, 2021
| Q | A |
|---|---|
| Branch? | 5.4 |
| Bug fix? | no |
| New feature? | no |
| Deprecations? | no |
| Tickets | - |
| License | MIT |
| Doc PR | - |
| * This cache warmer is not optional, without proxies fatal error occurs! | ||
| * | ||
| * @returnfalse | ||
| * @returnbool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
false is not allowed as a standalone type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
But it is allowed as a PHPdoc type:https://docs.phpdoc.org/3.0/guide/references/phpdoc/types.html
And also recognized by static analysis tools as such. Should we keep@return false and detect this as: bool in the class loader? (feel free to ignore if you think it's not worth the effort)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
false is allowed, but just not as a standalone type: it should always be part of a union
| */ | ||
| publicfunctiongetFunctions() | ||
| { | ||
| $functions = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ExpressionFunctionProviderInterface mandates an array
| * Shortcut to create a PostAuthenticationToken for you, if you don't really | ||
| * care about which authenticated token you're using. | ||
| * | ||
| * @return PostAuthenticationToken |
nicolas-grekasAug 11, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
AbstractAuthenticator cannot force child classes to return an instance ofPostAuthenticationToken.
FormLoginAuthenticator doesn't btw.
Uh oh!
There was an error while loading.Please reload this page.
c2c9d2e to495f073Compare| publicfunctiontestCustomUuidfactory() | ||
| { | ||
| $uuid =newNilUuid(); | ||
| $uuid =newUuidV4(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
/cc@fancyweb FYI, this test was breaking the contracts