-
Notifications
You must be signed in to change notification settings - Fork 179
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
Leverage PHP 7 language features #7597
Comments
Useful features.
|
PHPStorm gives me tons of recommendations for automatically adding types and using null coalescing operators throughout the code base. That seems like a good start. Don't think grouping use statements provides much value, so we can skip that for now. We have to be careful adding type declarations to |
How do you see these recommendations? |
I think the ones I get are provided by the https://plugins.jetbrains.com/plugin/7622-php-inspections-ea-extended- plugin. Can highly recommend installing it 👍 |
This might be useful as well - https://github.com/rectorphp/rector |
After trying out refactor, here is the output. |
Looks promising 👍 We'll probably have to remove some of those for |
Task Description
With the PHP version requirement bump we can use language features introduced in PHP 7, like scalar type declarations, return type declarations, and the null coalescing operator.
See https://www.php.net/manual/en/migration70.new-features.php for a full list of changes.
I expect the IDE can help with a lot of these optimizations.
The text was updated successfully, but these errors were encountered: