symfony / symfony/maker-bundle
make:crud tries to use the wrong class when the specified class name is the first part of another class name
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 427
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 20
Description
For example, I used make:crud to generate a controller for my entity SampleClassification. Then I created another entity Sample, but when I tried to make:crud for Sample I got this error:
[ERROR] The file "src/Controller/SampleClassificationController.php" can't be generated because it already exists.
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 with the make:crud command and reproduce the reported sequence using SampleClassification followed by Sample. Inspect how the requested class name is matched to the generated controller path. Done means requesting Sample generates SampleController.php instead of reusing SampleClassificationController.php.
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
- 35/100