Description
Hi,
some days ago, I wanted to launch a debate about the console commands available in Standard edition.
Actual status
For the record, we have 72 commands available when we install Symfony (71 if we remove the Symfony ACL component).
I don't think this need a screenshot, we can say the first contact with the console is undoubtely disturbing for a lot of newbies:
- too much commands;
- too much options
- some weird duplicates ... (this point is already fixed in 3.0.X release)
Before release the new major in november, the deletion of all deprecated command is planned (no specific issue) and the new UI update is in progress (#14138).
Commands of Standard Edition come from Bundles:
- AsseticBundle
- DoctrineBundle
- SwiftMailerBundle
- FrameworkBundle
- ...
They are autoloaded and registered without any intervention of developper. As @fabpot said, if we don't want the commands, we can uninstall the related bundle.
Commands come from bundles
But theses bundles provide a lot of others useful things that make them required in Standard Edition:
- Compiler passes
- Event listeners
- Complete applications ? (like the WebProfiler)
So, I think remove some of theses bundles can't be an option.
Survey about Symfony commands
Few days ago, I started to share a survey about the Symfony commands use. You can see the complete results here
Some easy conclusions according to the survey:
- Almost 15 commands are (mostly) never used
- 60% (~50 !) of theses commands are not used by a majority of developpers
Some ideas
To improve the DX of the Symfony console, many strategies can be applied:
- Remove some commands;
- Move theses commands into "Extra" Bundles (debug-command-bundle, security-command-bundle, doctrine-command-bundle ...);
- Make some of theses command real console applications (yaml-linter, php-security-checker ...);
- Play with the
isEnabled()
function: only enable to most used command by default; - Implement a "two levels" displaying of console like rails for instance: the first time we only see the categories of commands, then when we call a category (
php app/console doctrine
) the console returns all available commands in this category. - ... and probably far better ideas you have :)
Of course, many strategies can be applied, and this issue is more about debate than suggest a pull request that remove everything :)
What do you think ?