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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!!TASK: Add PHP 7.0 scalar type hints to method arguments and return types #999
Conversation
@albe, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kdambekalns, @kitsunet and @radmiraal to be potential reviewers. |
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.
Looks good (by reading)
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.
Looks good, but must not be merged until 3.3 has been branched, since it's a breaking change. sigh
@@ -132,7 +132,7 @@ protected function tryToAcquireLock($exclusiveLock) | |||
* @param boolean $exclusiveLock | |||
* @throws LockNotAcquiredException | |||
*/ | |||
protected function applyFlock($exclusiveLock) | |||
protected function applyFlock(bool $exclusiveLock) |
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.
While we are at it, and since void
as return type is only supported in PHP 7.1, why not add the missing @return
annotation here? ;)
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.
Good call
I was thinking of doing a b/c version of this and the other PR if I still get it done before the release. That way we hopefully have "as much as possible typehinting" in the release without breaking stuff and can then add breaking typehint in interfaces and possibly even strict_types for next major |
This is only breaking for classes implementing
LockStrategyInterface
, whose signature now requires scalar typehints.