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

chore: implement stricter PHPStan ruleset and fix new errors. #213

Merged
merged 4 commits into from
Mar 27, 2024

Conversation

justlevine
Copy link
Contributor

@justlevine justlevine commented Mar 26, 2024

What

This PR updates phpstan.neon.dist for stricter detection of errors, and addresses the newly-detected errors. More specifically:

  • Calls to DiDom\Document::loadHtml() have been updated to use the correct casing. (Previously these were calls to loadHTML())
  • Removes null from the return DocType of DOMHelpers::getElementsFromHTML() and DOMHelpers::parseHTML(), since those methods only turn a type string IRL. Note: The method signature was not changed.

Warning

This PR requires #210 , which should be merged first (to avoid conflicts with the PHPStan baseline). The relevant commits for this PR are:
- b7109ac
- 4308eaf
- 52099c2

@justlevine justlevine requested a review from a team as a code owner March 26, 2024 05:56
Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: b6b8af1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/wp-graphql-content-blocks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@justlevine justlevine force-pushed the chore/stricter-phpstan-rules branch from 4b1350d to b6b8af1 Compare March 27, 2024 15:47
@justlevine
Copy link
Contributor Author

(rebased on main)

@mindctrl mindctrl merged commit 43791db into wpengine:main Mar 27, 2024
5 of 6 checks passed
@mindctrl
Copy link
Contributor

Thank you @justlevine!

@justlevine justlevine deleted the chore/stricter-phpstan-rules branch March 27, 2024 15:54
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