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

bug: Fix PhpdocVarWithoutNameFixer with Closure with $this #6979

Merged
merged 13 commits into from
Jun 11, 2023

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented May 20, 2023

fix #6959

@mvorisek mvorisek marked this pull request as ready for review May 20, 2023 10:36
@Wirone
Copy link
Member

Wirone commented May 23, 2023

Sorry @mvorisek I did not have time during the weekend to review this, so it wasn't included in 3.17 release... Will look as soon as possible, but this week and upcoming I have pretty busy (PHPers conference 😁).

tests/Fixer/Phpdoc/PhpdocVarWithoutNameFixerTest.php Outdated Show resolved Hide resolved
src/AbstractPhpdocToTypeDeclarationFixer.php Outdated Show resolved Hide resolved
src/Fixer/Basic/PsrAutoloadingFixer.php Outdated Show resolved Hide resolved
@mvorisek mvorisek marked this pull request as draft June 8, 2023 10:51
@mvorisek mvorisek marked this pull request as ready for review June 8, 2023 11:02
Copy link
Contributor

@kubawerlos kubawerlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically these changes are fine, I wonder only if $this is that special. Could the type be self instead or that would be differently "understood" by some tools?

@Wirone
Copy link
Member

Wirone commented Jun 8, 2023

@kubawerlos $this is slightly different than self - the former is narrower.

@Wirone Wirone merged commit 173db34 into PHP-CS-Fixer:master Jun 11, 2023
14 checks passed
@Wirone
Copy link
Member

Wirone commented Jun 11, 2023

Thanks @mvorisek 🍻

@mvorisek mvorisek deleted the fix_6959_this_in_closure branch June 11, 2023 09:03
niklam pushed a commit to niklam/PHP-CS-Fixer that referenced this pull request Jun 19, 2023
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.

phpdoc_var_without_name is corrupting phpdoc type with $this
3 participants