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

Fix PHPStan issues and build on PHP 8.2 #368

Merged
merged 11 commits into from Sep 5, 2022

Conversation

sanmai
Copy link
Contributor

@sanmai sanmai commented Feb 18, 2022

Looks like PHPStan is kinda lost here.

@sanmai sanmai changed the title Ignore bogus PHPStan error on CI Fix PHPStan issues and build on PHP 8.2 Sep 5, 2022
@@ -24,11 +24,10 @@
"psr-4": { "Michelf\\": "Michelf/" }
},
"require-dev": {
"phpspec/prophecy": "^1.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need for this dependency. See:
sebastianbergmann/phpunit#5033 (comment)

@michelf
Copy link
Owner

michelf commented Sep 5, 2022

I see you're hitting some problems with the PHPStan and the tests. I think it's confused by the implicit treatment of DOMNode as DOMText (and perhaps other similar things). I tried to fix it in #377, but ended up fixing the wrong things and abandoned because I had not time left for this.

Thank you for your work.

@@ -26,4 +26,5 @@ jobs:
- run: composer install --no-progress
# - run: composer codestyle
- run: composer phpstan
if: matrix.php == '8.1'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we run PHPStan on every version, we'll use different versions of PHPStan detecting different sets of issues (due to bugs in older versions or whatnot).

@sanmai
Copy link
Contributor Author

sanmai commented Sep 5, 2022

@michelf Thanks for considering this PR! Please let me know if you need anything else or something isn't clear. Hopefully you can squash-merge this mess of commits.

@sanmai
Copy link
Contributor Author

sanmai commented Sep 5, 2022

Build is passing 🎉

@michelf michelf merged commit 546b80a into michelf:lib Sep 5, 2022
@sanmai sanmai deleted the pr/2022-02/phpstan branch September 5, 2022 01:34
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