maker-bundle
maker-bundle copied to clipboard
The maker generate my repositories in wrong folder with non standard project structure
In my directories structure is something like this:
- My entities are located in
src/Infrastructure/Doctrine/Entity
- Repositories in
src/Infrastructure/Doctrine/Repository
My config:
doctrine:
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
VipGetzner:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Infrastructure/Doctrine/Entity/'
prefix: 'VipGetzner\Infrastructure\Doctrine\Entity'
alias: VipGetzner
with php bin/console make:entity \\VipGetzner\\Infrastructure\\Doctrine\\Entity\\Foo
I have my entity generated correctly.
but the generated repository is inside src/Repository/Infrastructure/Doctrine/Entity
!
The createClassNameDetails()
inside the EntityClassGenerator
class use always "Repository\\" as namespace prefix.
@bechir i know your problem, i write a wrapper to resolve that try twc/makerBundle
is there any progress?
I also have a similar problem. Have you found a solution since ?
Update: I solved the problem on my side via the maker config. see here: https://symfony.com/bundles/SymfonyMakerBundle/current/index.html#configuration