There is a contradiction between php_unit_internal_class, final_internal_class, and php_unit_test_case_static_method_calls rules when they are used together with default options.
php_unit_internal_class marks PHPUnit test classes as internalfinal_internal_class makes them finalphp_unit_test_case_static_method_calls makes all calls to PHPUnit methods use the static keyword, but there is no point in using the static keyword in a final classI propose to change the default value of the call_type option of the php_unit_test_case_static_method_calls rule from 'static' to 'self'.
Perhaps a new fixer for using self instead of static in final classes?
Perhaps a new fixer for using
selfinstead ofstaticin final classes?
While not a bad idea in itself, it does feel like a kind of "brute force solution", and I personally would agree more with the proposed default-change. It's the config that altogether makes the most sense imho, and what I'd use myself anyway.
I think both would be good, however changing the default behaviour would have to target 3.0, whereas a new fixer can target the next minor.
I am no longer interested in this. Feel free to reopen if needed.
Most helpful comment
Perhaps a new fixer for using
selfinstead ofstaticin final classes?