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

Annotation to Attributes - JoinColumn add to cascade array #232

Closed
etshy opened this issue Sep 18, 2023 · 1 comment
Closed

Annotation to Attributes - JoinColumn add to cascade array #232

etshy opened this issue Sep 18, 2023 · 1 comment

Comments

@etshy
Copy link

etshy commented Sep 18, 2023

I ran AnnotationToAttribute set and got a weird thing happening

I had this before

/**
     * @Mapping\ManyToOne(targetEntity=Application::class, inversedBy="options", fetch="EXTRA_LAZY", cascade={"persist"})
     * @Mapping\JoinColumn(name="application_id", referencedColumnName="id", nullable=false)

And after rector I got this

#[ORM\ManyToOne(targetEntity: Application::class, inversedBy: 'options', fetch: 'EXTRA_LAZY', cascade: ['persist', new ORM\JoinColumn(name: 'application_id', referencedColumnName: 'id', nullable: false)])]
#[ORM\JoinColumn(name: 'application_id', referencedColumnName: 'id', nullable: false)]

The JoinColumn was added to the cascade array and is causing the following exception

strtolower(): Argument #1 ($string) must be of type string, Doctrine\ORM\Mapping\JoinColumn given
@etshy
Copy link
Author

etshy commented Sep 19, 2023

Nevermind that it came from another custom Rule I made.
Closing this

@etshy etshy closed this as completed Sep 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

No branches or pull requests

1 participant