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 dev dependencies #254

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Update dev dependencies #254

merged 3 commits into from
Mar 19, 2024

Conversation

spaze
Copy link
Owner

@spaze spaze commented Mar 19, 2024

Support nikic/php-parser 5 and PHPUnit 11.

Added in PHPUnit 10, in 11 docblocks with no attributes throw something like

3) Metadata found in doc-comment for method Spaze\PHPStan\Rules\Disallowed\Identifier\IdentifierTest::testMatches(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
There's already a similar check there and PHPUnit 11 throws the following error when the check is done when the code is analyzed. That's because PHPStan sets its own error handler in \PHPStan\Analyser\FileAnalyser::analyseFile() ($this->collectErrors($analysedFiles)) but when there's an error like this, it doesn't reset it.

The PHPUnit error:
1) Spaze\PHPStan\Rules\Disallowed\Calls\FunctionCallsTypeStringParamsInvalidFlagsConfigTest::testException
Test code or tested code did not remove its own error handlers
@spaze spaze self-assigned this Mar 19, 2024
@spaze spaze merged commit bcd693f into main Mar 19, 2024
74 checks passed
@spaze spaze deleted the spaze/update-dev-deps branch March 19, 2024 02:51
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.

1 participant