Skip to content

T_NULLABLE detection not working for nullable parameters and return type hints in some cases #1442

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

Closed
wants to merge 1 commit into from

Conversation

kukulich
Copy link
Contributor

@kukulich kukulich commented May 5, 2017

The commit 46983c7 broke T_NULLABLE detection. This should fix it and #1421 should still be fixed too.

The pull request is based on 2.9 branch however it's very easy to port this bugfix to 3.0 branch. You just have to change PHP_CodeSniffer_Tokens::$emptyTokens to Utils\Tokens::$emptyTokens.

It would be very nice if you could release versions 2.9.1 and 3.0.1 very quickly. Actually both versions are unusable for users that use nullable parameter and return type hints.

@gsherwood gsherwood changed the title Fixed T_NULLABLE detection T_NULLABLE detection not working for nullable parameters and return type hints in some cases May 8, 2017
gsherwood added a commit that referenced this pull request May 8, 2017
…eters and return type hints in some cases
gsherwood added a commit that referenced this pull request May 9, 2017
…eters and return type hints in some cases
@gsherwood
Copy link
Member

Thanks for the bug report, although I decided to code this in a slightly different way to avoid the extra loops and lines of code. I've committed a fix for versions 2 and 3, but I'm definitely not going to release without leaving the fixes in place for a while.

@TomasVotruba
Copy link
Contributor

Could you please release fix versions? This is blocker for long line of packages that depend on this.

See: slevomat/coding-standard#151

@TomasVotruba
Copy link
Contributor

TomasVotruba commented Jun 14, 2017

Thank you @gsherwood and @kukulich

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