Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global CLI flags #554

Open
neos-bot opened this issue Feb 25, 2015 · 1 comment
Open

Global CLI flags #554

neos-bot opened this issue Feb 25, 2015 · 1 comment

Comments

@neos-bot
Copy link
Contributor

Jira issue originally created by user @bwaidelich:

It should be possible to define global flags that can be used for all commands

Jira-URL: https://jira.neos.io/browse/FLOW-216

@neos-bot
Copy link
Contributor Author

Comment created by @bwaidelich:

Some ideas for global flags

help

Allows to append "--help" to any command to see it's description

verbose

A new method could be added AbstractCommandController::isVerbose() that returns TRUE if the flag is set

Considerations:

  • do we need multiple verbosity levels (-v, -vv, -vvv)?
  • What if a command expects a $verbose argument - I think it should be possible to pass that on anyways.. If it's not a boolean argument, an exception should be thrown
    ** Should we change the signature of the output**() methods to incorporate the verbosity flag? E.g.: protected function output($text, array $arguments = array(), $verbosityLevel = self::VERBOSITY_GENERAL)

context

Allows executing of commands in a different context, e.g. ./flow flow:cache:flush --context Production

Considerations:

  • Should it be possible to specify multiple contexts (comma separated)?
    ** Currently it's not possible to determine all defined contexts (a context is implicitly created according to the FLOW_CONTEXT* env variable). An idea to circumvent this is, that a context is only valid if a corresponding directory exists in the global configuration folder, e.g. Configuration/Development/MyContext .This would allow us to fetch all registered (sub)contexts. Also it would make it easier to react to typos in the specified context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants