Inject into CLI services
New WP-CLI commands can be introduced using the CliCommand::class
. Unfortunately it was almost impossible to inject services or parameter from the container. With this patch we implemented and documented an easier way to inject services into CLI-Commands.
- CLI-Command-Services are no longer lazy as wp-cli needs the direct object/class for its features (e.g. help text)
- CLI-Command-Services are only available when working on the shell (to spare costs of web calls)