-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PhpUnitDedicateAssertFixer is replacing functions with deprecated/removed method names of PHPUnit v9.1+ #7968
Labels
Comments
hdcore
added
kind/bug
status/to verify
issue needs to be confirmed or analysed to continue
labels
Apr 24, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 8, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 8, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 8, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 9, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 9, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 9, 2024
Wirone
removed
the
status/to verify
issue needs to be confirmed or analysed to continue
label
May 9, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 11, 2024
krzysztof-ciszewski
added a commit
to krzysztof-ciszewski/PHP-CS-Fixer
that referenced
this issue
May 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
Since PHPUnit version 9.1 some of the dedicated asserts methods are renamed to a more readable name.
E.g. assertDirectoryNotExists() is renamed to assertDirectoryDoesNotExists()
(see list on https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md)
Since PHPUnit version 10 these deprecated methods are removed.
The PhpUnitDedicateAssertFixer is still referencing to the old names
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php.
So when i'm using PHPUnit version 10+ the fixer will break my code.
it will not work anymore.
Minimal reproducer
Using the rulset: @PHPUnit100Migration:risky with this code:
Result:
Must be when using PHPUnit 9.1+:
Fixer version
3.54.0
PHP version
8.3.6
How do you run Fixer?
Composer package
Contribution Checks
The text was updated successfully, but these errors were encountered: