Skip to content

Support attributes in RemoveFinalFromEntityRector#3727

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
alexndlm:feature/support-attributes-in-RemoveFinalFromEntityRector
May 6, 2023
Merged

Support attributes in RemoveFinalFromEntityRector#3727
TomasVotruba merged 1 commit intorectorphp:mainfrom
alexndlm:feature/support-attributes-in-RemoveFinalFromEntityRector

Conversation

@alexndlm
Copy link
Copy Markdown
Contributor

@alexndlm alexndlm commented May 2, 2023

No description provided.

@alexndlm alexndlm requested a review from TomasVotruba as a code owner May 2, 2023 14:51

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]class SomeClass
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is probably some bug in file writing, but it is not related to this PR.

This syntax is valid.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is fine, as using attribute means in php 8.x, the line information is equal with node information, that's why it printed in same line, see:

Re-print the class can solve it, eg:

$node->setAttribute(AttributeKey::ORIGINAL_NODE, null);

but that can probably be dangerous as class can have many information that may be loss and re-print may make too many diff.

@TomasVotruba
Copy link
Copy Markdown
Member

Thank you, this looks good enough 👍

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