symfony / maker-bundle

Symfony Maker Bundle
https://symfony.com/
MIT License
3.36k stars 405 forks source link

[make:entity] Error when linking a relation property with FQCN using command. #983

Open fd6130 opened 3 years ago

fd6130 commented 3 years ago

Normally we are using App\Entity namespace and folder in Symfony and the maker command can easily detect that.

But when i'm using a subfolder such as App\Entity\Product, it lose the auto detect/auto complete from the command (i think it is fine? Not sure though). And it is broken when i try to link a relation property using FQCN.

Example, linking a OneToOne relation using FQCN will lead to error:

Compile Error: Cannot declare class App\Entity\Product\Product, because the name is already in use

tmarly commented 1 year ago

I confirm, make:entity does not work when:

I did reproduce it on a fresh 6.3 symfony install, with maker 1.49 and php 8.2