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

Closes #6946 Ignore PHPstan error related to require #6962

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

Tabrisrp
Copy link
Contributor

@Tabrisrp Tabrisrp commented Sep 9, 2024

Description

Fixes #6946

Ignore the new PHPStan error from 1.12.1 related to require

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

The error is reported in 2 places by PHPStan where we require files from WordPress.

Technical description

Documentation

Following the discussion on szepeviktor/phpstan-wordpress#239, the best approach seems to be to ignore the error in a case by case basis.

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.

Code style

  • I wrote a self-explanatory code about what it does.
  • I did not introduce unnecessary complexity.

@Tabrisrp Tabrisrp requested a review from a team September 9, 2024 19:51
@Tabrisrp Tabrisrp self-assigned this Sep 9, 2024
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for a3866831 (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a386683) Report Missing Report Missing Report Missing
Head commit (e7544cc) 37567 9465 25.19%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6962) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Tabrisrp Tabrisrp marked this pull request as ready for review September 10, 2024 13:46
Copy link
Contributor

@wordpressfan wordpressfan left a comment

Choose a reason for hiding this comment

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

Only one comment:
Here:

https://github.com/wp-media/wp-rocket/blob/feature/lrc/phpstan.neon.dist#L55

this line was added to feature/lrc branch so we will need to remove it once merged into develop because this PR targets develop branch.

@MathieuLamiot MathieuLamiot added this pull request to the merge queue Sep 11, 2024
Merged via the queue into develop with commit 84982f8 Sep 11, 2024
13 checks passed
@MathieuLamiot MathieuLamiot deleted the chore/6946-ignore-require branch September 11, 2024 08:37
@MathieuLamiot
Copy link
Contributor

@wordpressfan Done on feature/lrc branch ✅

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

Successfully merging this pull request may close these issues.

[DEV] Enable requireFileExists rule in phpstan
3 participants