Skip to content

fix: PhpdocToCommentFixer on property hooks#9123

Merged
kubawerlos merged 4 commits intoPHP-CS-Fixer:masterfrom
carl-sauter:fix-phpdoc-to-comment-on-hooks
Oct 2, 2025
Merged

fix: PhpdocToCommentFixer on property hooks#9123
kubawerlos merged 4 commits intoPHP-CS-Fixer:masterfrom
carl-sauter:fix-phpdoc-to-comment-on-hooks

Conversation

@carl-sauter
Copy link
Copy Markdown
Contributor

@carl-sauter carl-sauter commented Oct 2, 2025

Fixes that phpdocs gets converted to comments on property hooks.
Fixes #9120

@carl-sauter
Copy link
Copy Markdown
Contributor Author

Property hooks has no parser tokens, so I had to check for T_STRING and content. I don't know if there is a better solution for this.

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 2, 2025

Coverage Status

coverage: 94.133% (-0.02%) from 94.149%
when pulling 53c27ee on Kinqdos:fix-phpdoc-to-comment-on-hooks
into e0516ca on PHP-CS-Fixer:master.

Comment thread tests/Fixer/Phpdoc/PhpdocToCommentFixerTest.php
@kubawerlos kubawerlos changed the title fix: phpdoc-to-comment on property hooks fix: PhpdocToCommentFixer on property hooks Oct 2, 2025
@kubawerlos kubawerlos merged commit 5b0ae41 into PHP-CS-Fixer:master Oct 2, 2025
31 of 32 checks passed
@kubawerlos
Copy link
Copy Markdown
Member

I don't know if there is a better solution for this.

If there is, anyone can always refactor to it.

Thank you @Kinqdos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

phpdoc_to_comment trigger at phpdoc for hooks

3 participants