symfony / symfony/maker-bundle
[RFC] Add target option to all commands (dir relative to the project root)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 427
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 20
Description
Related with https://github.com/symfony/maker-bundle/issues/2 and https://github.com/symfony/maker-bundle/issues/49
What about a new target option for each command that allows us to change the target directory where the final skeleton file is generated?
For example make:unit-test FooTest always creates the file class inside tests/ directory, but as the best practice recommends:
By convention, the
tests/directory should replicate the directory of your bundle for unit tests. So, if you're testing a class in thesrc/Util/directory, put the test in thetests/Util/directory.
Something like this make:functional-test FooTest --target=tests/Util will be great to not move each generated file to the corresponding directory and change its namespace.
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 by reviewing the make:unit-test and make:functional-test command entry points, then compare how the other commands choose their generated-file directories. Check the related issues #2 and #49 for context. Done means every command consistently accepts a target directory relative to the project root and generates the file there with the matching namespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100