Skip to content
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
merged 1 commit into from
Oct 7, 2019

Conversation

WyriHaximus
Copy link
Member

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 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.

…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.
@WyriHaximus WyriHaximus requested review from jsor and clue October 7, 2019 13:32
@clue clue added the BC break label Oct 7, 2019
@clue clue added this to the v3.0.0 milestone Oct 7, 2019
Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🏅

@jsor jsor merged commit d0f2f2a into reactphp:master Oct 7, 2019
@WyriHaximus WyriHaximus deleted the return-typehints branch October 7, 2019 19:03
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants