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

Suppress deprecation notices about return types #3851

Closed
wants to merge 1 commit into from

Conversation

fredden
Copy link
Contributor

@fredden fredden commented Jul 11, 2023

Description

While working on another pull request in this repository, I noticed that phpstan was complaining about an unrelated problem to the pull request at hand. I've investigated this further and found that #3400 solves the same problem as here for another class. This can be considered a follow-up to that pull request.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added XML documentation for the sniff.
  • [Required for new files] I have added any new files to the package.xml file.

@jrfnl
Copy link
Contributor

jrfnl commented Jul 11, 2023

@fredden I was a bit surprised to see this PR as I use the --filter=GitModified (and GitStaged) options extensively and am running on PHP 8.2.

I just investigated to be sure, but this is a non-issue as the parent class Filter already declares the #[ReturnTypeWillChange] attribute on those methods and the child class ExactMatch inherits these.

See: https://3v4l.org/63Fss

I suggest reporting a bug to PHPStan instead.

@fredden
Copy link
Contributor Author

fredden commented Jul 11, 2023

I've not seen any deprecation warnings coming from PHP regarding this, only from PHPStan. Reporting this there makes sense. I'll open an issue there and then close this.

@fredden
Copy link
Contributor Author

fredden commented Jul 11, 2023

I've opened phpstan/phpstan#9615 to replace this.

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.

2 participants