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

[PHP 8.0] Add NestedAnnotationToAttributeRector #2781

Merged
merged 5 commits into from Aug 18, 2022

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Aug 18, 2022

It was a naughty case, so it took the all-day effort to rewrite this rule from scratch 😪

It was lot of work, but now it is finally possible to deal with unwrapping of Doctine annotation to attributes 🥳 👍


Before

    /**
     * @ORM\JoinTable(name="join_table_name",
     *     joinColumns={
     *          @ORM\JoinColumn(name="target_id"),
     *     },
     *     inverseJoinColumns={
     *          @ORM\JoinColumn(name="another_id")
     *     }
     * )
     */
   private $collection;

After

    #[ORM\JoinTable(name: 'join_table_name')]
    #[ORM\JoinColumn(name: 'target_id')]
    #[ORM\InverseJoinColumn(name: 'another_id')]
    private $collection;

@TomasVotruba TomasVotruba changed the title tv split nested attributes [PHP 8.0] Add NestedAnnotationToAttributeRector Aug 18, 2022
@TomasVotruba TomasVotruba force-pushed the tv-split-nested-attributes branch 2 times, most recently from 8694a7e to 9213cb9 Compare August 18, 2022 16:22
@TomasVotruba TomasVotruba force-pushed the tv-split-nested-attributes branch 2 times, most recently from 7875554 to df1bdaf Compare August 18, 2022 17:40
@TomasVotruba
Copy link
Member Author

Let's merge this first to update the Doctrine package 🙂

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