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

Fix doctrine join table annotation to attribute rector #2740

Closed

Conversation

acrobat
Copy link
Contributor

@acrobat acrobat commented Aug 6, 2022

Start on fix for rectorphp/rector#7346 and rectorphp/rector-doctrine#116 (point 3)

@samsonasik the only thing i'm struggling with is the conversion of
inverseJoinColumns={@ORM\JoinColumn(name="target_id", referencedColumnName="id")}
to
#[ORM\InverseJoinColumn(name: 'target_id', referencedColumnName: 'id')]
because it is not converting the annotation one to one to the attribute.

So I will need some help to fix this

@TomasVotruba
Copy link
Member

I'll look into this tomorrow. Thanks for test fixture.

Maybe we'll need a separate rule to deal with splitting annotation to attributes.

@TomasVotruba
Copy link
Member

TomasVotruba commented Aug 18, 2022

In the end this required a lot of refactoring and brand new rule 🙂
This rule solely handles nested cases like these.

I've cherry picked your test in: #2781
Thank you 👍

Get ready for testing tomorrow 😉

@acrobat acrobat deleted the fix-doctrine-many-to-many-attribute branch August 19, 2022 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants