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

[PHPStan] Prepare for PHPStan 1.6.x-dev #5876

Merged

Conversation

samsonasik
Copy link
Member

PHPStan 1.6.0 will remove parent, next, previous attribute from node on bleedingEdge feature toggles, while it only disable when bleedingEdge enabled, it may possibly be removed in the future, so I think it is better to prepare early.

We used the previous attribute check on CheckUseStatementsAfterLicenseRule for it:

$previous = $node->getAttribute('previous');

This PR is for draft and can be updated to use ^1.6 when PHPStan 1.6 released.

References:

Checklist:

  • Securely signed commits

@samsonasik samsonasik marked this pull request as draft April 7, 2022 18:21
@MGatner
Copy link
Member

MGatner commented Apr 10, 2022

Thanks for being ahead of this!

@samsonasik samsonasik force-pushed the phpstan-prepare-for-phpstan-16x branch from 4a644a5 to fc9a7b8 Compare April 15, 2022 13:36
@samsonasik samsonasik marked this pull request as ready for review April 15, 2022 13:37
@samsonasik
Copy link
Member Author

PHPStan 1.5.6 released and backward compatible already conditionalTags on NodeConnectingVisitor already added.

@samsonasik
Copy link
Member Author

PHPStan github action green 🎉 ref https://phpstan.org/blog/preprocessing-ast-for-custom-rules for config reference on PHPStan 1.6.0 that the compat can be configured via conditionalTags

@samsonasik samsonasik merged commit b3750d4 into codeigniter4:develop Apr 15, 2022
@samsonasik samsonasik deleted the phpstan-prepare-for-phpstan-16x branch April 15, 2022 17:39
@samsonasik samsonasik added the enhancement PRs that improve existing functionalities label Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants