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

Improved detection of strict throws flag #1815

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ricardoboss
Copy link

@ricardoboss ricardoboss commented Feb 22, 2022

This PR is an attempt to address #1725.

I'm not an experienced Java developer and certainly not a plugin dev. I was unable to run this locally due to some errors with NotNull annotations and java.lang.Object not being found...

I hope to get some support to properly run this locally and fix any issues on the way.

);
}

if (HARDEN_ERRORS_HANDLING && arguments.length > 0 && PhpLanguageLevel.get(holder.getProject()).atLeast(PhpLanguageLevel.PHP730)) {
Copy link

Choose a reason for hiding this comment

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

I didn't test it, but isn't named arguments a feature that was introduced in PHP 8.0? If I'm thinking correctly, the new replacements inside this if block would only work in PHP 8.0 or newer projects, but the plugin would still replace with named arguments in PHP 7.3 and 7.4.

Copy link
Author

Choose a reason for hiding this comment

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

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants