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
[PHPUnit] Add migration for 7.5 assertInternalType #4144
Comments
AST integration in Rector for inspiration: rectorphp/rector@a59e356#diff-d98925ff1d61912b3a56a882ffafeae3 One drawbacks is that -$this->assertNotInternalType('bool', $value, 'message');
+$this->assertIsNotBool($value, 'message');
-$this->assertNotInternalType('boolean', $value, 'message');
+$this->assertIsNotBool($value, 'message'); |
@SpacePossum Could you elaborate on 😕 ? |
The linking to other tooling/project that use AST confuses (:confused:) me because this tool does not use AST, it works with tokens. |
It's not about AST, it's about test case fixtures that you can copy while writing the fixer - rectorphp/rector@a59e356#diff-fb3d7cfa2c5b2dca79374f0551cbaeec I've probably used wrong link, I wanted to share fixture, not the AST code. Is that more clear now? |
I see now, thanks for the help! |
Great! I'm glad it's clear 👍 . Free free to comment next time, if something I write seems confusing. I'm happy for feedback to improve my writing. |
This PR was squashed before being merged into the 2.15-dev branch (closes #4328). Discussion ---------- Add PhpUnitDedicateAssertInternalTypeFixer Closes #4144 - [x] Update `RuleSet` - [x] Add integration test with `PhpUnitDedicateAssertInternalTypeFixer` I intentionally created a new fixer instead of updating [PhpUnitDedicateAssertInternalTypeFixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.14.2/src/Fixer/PhpUnit/PhpUnitDedicateAssertFixer.php) because the codes need too different logics. I don't really like the names, they may confuse the users, any suggestion is welcome, but I would like to keep the two fixers in two different classes. Commits ------- f721b4b Add PhpUnitDedicateAssertInternalTypeFixer
References: https://github.com/sebastianbergmann/phpunit/blob/7.5.0/ChangeLog-7.5.md
The text was updated successfully, but these errors were encountered: