You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a relation that starts with the word "test," like testQuestions in my case, Laravel automatically converts it to test_questions. I assume this happens due to the naming conventions used for tests.
Steps To Reproduce
Screen.Recording.2025-01-05.at.12.14.25.mov
The text was updated successfully, but these errors were encountered:
@ricdizio I think the problem here is that this class is not a testcase. It's an eloquent model. So the php_unit_method_casing rule should not even apply here.
However, this is just how the rule is implemented in PHP-CS-Fixer: I found the following code snippet that determines if a method is interpreted as a test or not. I don't think this is an issue with Laravel Pint, but rather with PHP-CS-Fixer. So I suggest creating an issue there. I'm guessing this is pretty difficult to fix because PHP-CS-Fixer mostly does string comparisons based on the class and method name. Which in you case both contains Test. But maybe there are some contributors there who can help you further.
Pint Version
1.18.3
PHP Version
8.1
Description
If you have a relation that starts with the word "test," like
testQuestions
in my case, Laravel automatically converts it totest_questions
. I assume this happens due to the naming conventions used for tests.Steps To Reproduce
Screen.Recording.2025-01-05.at.12.14.25.mov
The text was updated successfully, but these errors were encountered: