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

[BUGFIX] Ensure proper reprint with attributes for finalized classes #4585

Merged

Conversation

cngJo
Copy link
Contributor

@cngJo cngJo commented Jul 23, 2023

Previously, a finalized class would be printed on the same line as the attribute above, like this:

#[SomeAttribute]final class ClassWithAttribute
{
}

for the new provided test case.


Fixes #8080

@cngJo cngJo requested a review from TomasVotruba as a code owner July 23, 2023 09:36
@cngJo cngJo force-pushed the 8080-improve-reprint-of-finalized-classes branch from ec0447d to de8ebf2 Compare July 23, 2023 09:36
@samsonasik samsonasik enabled auto-merge (squash) July 23, 2023 09:38
@samsonasik
Copy link
Member

Thank you @cngJo

@samsonasik samsonasik merged commit 50a5bb4 into rectorphp:main Jul 23, 2023
@@ -0,0 +1,21 @@
<?php

namespace Rector\Tests\Php82\Rector\Class_\ReadOnlyClassRector\Fixture;
Copy link
Member

Choose a reason for hiding this comment

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

oh, the namespace need to be changed based on the test namespace, I will change that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah damit, totally missed that. Thank you for taking care of that.

Copy link
Member

Choose a reason for hiding this comment

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

@cngJo
Copy link
Contributor Author

cngJo commented Jul 23, 2023

wow that was fast, thank you 🎉

@TomasVotruba
Copy link
Member

Thank you @cngJo 👍

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.

FinalizeClassesWithoutChildrenRector removed newline before final when class has Attributes
3 participants