maker-bundle
maker-bundle copied to clipboard
[make:entity] Error when linking a relation property with FQCN using command.
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
I confirm, make:entity does not work when:
- we use as field type: 'relation', 'OneToOne', 'ManyToOne' (I did not test others)
- AND entities are in subpackages (ex: src/Entity/Package1/Entity1.php being related with src/Entity/Package2/Entity2.php)
I did reproduce it on a fresh 6.3 symfony install, with maker 1.49 and php 8.2