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

Remove fixer, some PHPUnit non-static method calls were fixed to static calls #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shirshir
Copy link
Contributor

@shirshir shirshir commented Oct 8, 2024

For instance $this->once() was changed to self::once()

…ic calls

For instance `$this->once()` to `self::once()`
@dmvdbrugge
Copy link
Contributor

I have two questions:

  1. Has this been reported to PHP-CS-Fixer as bug? If so, can you link it? If not, could you do it?
  2. Is the intention to re-enable this rule when the bug is fixed?

@lcobucci
Copy link
Contributor

lcobucci commented Oct 8, 2024

Is this related to different expectation/assumptions on PHPUnit versions?

That method was static in PHPUnit 10.5 and was changed to non-static in recent version (11.5 for reference).

@shirshir
Copy link
Contributor Author

shirshir commented Oct 8, 2024

This was annoying me when adding a new PHPUnit 11 test, one editor plugin was suggestion to use $this->, while php-cs-fixer was changing it back to self:: 😄

Anyway, somebody else is working on a fix: PHP-CS-Fixer/PHP-CS-Fixer#8205

@dmvdbrugge
Copy link
Contributor

Anyway, somebody else is working on a fix

🎉

So there's 2 options now, we either a) just wait for the fix, or b) merge this one with the note to re-enable the rule once the fix is incorporated. I would be fine with both, granted the secondary action in b would actually happen.

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.

3 participants