symfony / symfony/maker-bundle
make:entity ignores psr-4 path from composer.json
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 427
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 20
Description
When you have set a psr-4 path for the autoloader in composer.json the make:entity ignores this and always tries to create the file at src/Entity.
Eg. if you have this in your composer.json so that the classes in Example\... namespace are stored in src/Example/... the make:entity always generates the entity file at src/Entity instead of src/Example/Entity.
"autoload": {
"psr-4": {
"Example\\": "src/Example"
}
},
For make:controller this seem to work correct as it does not rely on hardcoded paths like in MakeEntity.php
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in MakeEntity.php and reproduce the issue with the composer.json PSR-4 mapping shown in the report. Compare its path handling with make:controller, then verify that make:entity places the generated file under src/Example/Entity rather than src/Entity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100