-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Enforce return type hints on all functions and require PHP 7.1+ as a consequence #149
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…consequence With reactphp#138 requiring PHP 7.0 as a minimum we can now add return type hints to all our public and private functions. To give all functions return type hints we need the `void` return type, which isn't available until PHP 7.1. So in order use that we also have to bump the the minimum required PHP version for this package to PHP 7.1. The benefit of return type hints is the assurance at language level of our return values. For ourself and our consumers.
clue
approved these changes
Oct 7, 2019
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.
LGTM! 🏅
jsor
approved these changes
Oct 7, 2019
WyriHaximus
added a commit
to WyriHaximus-secret-labs/promise
that referenced
this pull request
Oct 7, 2019
Our current test suite has been around for a while and to keep it in shape for the future we need to modernize is one in a while. With the increase to PHP 7.1+ in reactphp#149 we can also bump the PHPUnit version to 7.
WyriHaximus
added a commit
to WyriHaximus-secret-labs/promise
that referenced
this pull request
Oct 7, 2019
Our current test suite has been around for a while and to keep it in shape for the future we need to modernize is one in a while. With the increase to PHP 7.1+ in reactphp#149 we can also bump the PHPUnit version to 7.
WyriHaximus
added a commit
to WyriHaximus-secret-labs/promise
that referenced
this pull request
Oct 7, 2019
Our current test suite has been around for a while and to keep it in shape for the future we need to modernize is one in a while. With the increase to PHP 7.1+ in reactphp#149 we can also bump the PHPUnit version to 7.
WyriHaximus
added a commit
to WyriHaximus-secret-labs/promise
that referenced
this pull request
Oct 7, 2019
Our current test suite has been around for a while and to keep it in shape for the future we need to modernize is one in a while. With the increase to PHP 7.1+ in reactphp#149 we can also bump the PHPUnit version to 7.
WyriHaximus
added a commit
to WyriHaximus-secret-labs/promise
that referenced
this pull request
Oct 7, 2019
Our current test suite has been around for a while and to keep it in shape for the future we need to modernize is one in a while. With the increase to PHP 7.1+ in reactphp#149 we can also bump the PHPUnit version to 7.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With #138 requiring PHP 7.0 as a minimum we can now add return type
hints to all our public and private functions. To give all functions
return type hints we need the
void
return type, which isn't availableuntil PHP 7.1. So in order use that we also have to bump the the
minimum required PHP version for this package to PHP 7.1.
The benefit of return type hints is the assurance at language level
of our return values. For ourself and our consumers.