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

Update PHPStan to 1.11.1 #1213

Merged
merged 6 commits into from May 15, 2024
Merged

Update PHPStan to 1.11.1 #1213

merged 6 commits into from May 15, 2024

Conversation

westonruter
Copy link
Member

Fixes #1209
See #775

  • Leverage the new PHPStan error identifiers to ignore errors.
  • Remove the need to ignore some errors.

@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label May 13, 2024
@westonruter westonruter added this to the performance-lab 3.1.0 milestone May 13, 2024
@westonruter westonruter marked this pull request as ready for review May 13, 2024 18:28
Copy link

github-actions bot commented May 13, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter
Copy link
Member Author

@thelovekesh Sorry, there is one more PR for PHPStan.

-
message: '/Parameter #\d.+given./'
identifier: argument.type
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: I tried originally to use identifier: argument.type with the ignored error above in dominant-color-images. However, it seems you can only use an identifier once in the ignoreErrors, or else the ignore is ignored (such ignorance!) But it is better anyway to use the message above since it is explicitly about GdImage|resource being used.

@@ -277,6 +277,7 @@ function perflab_install_activate_plugin_callback(): void {
* Callback function to handle admin inline style.
*
* @since 3.0.0
* @phpstan-ignore void.pure (PHPStan isn't apparently aware that this function is printing anything. See https://github.com/phpstan/phpstan/issues/11008)
Copy link
Member

Choose a reason for hiding this comment

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

PHPStan 1.11.1 was just released, fixing this.

Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

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

Let's update to 1.11.1 and then it should be good to go

@westonruter westonruter changed the title Update PHPStan to 1.11 Update PHPStan to 1.11.1 May 15, 2024
@westonruter westonruter merged commit 144fbf5 into trunk May 15, 2024
24 checks passed
@westonruter westonruter deleted the update/phpstan-1.11 branch May 15, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHPStan errors being ignored should specify the error identifiers
2 participants