Skip to content

Simple dependency resolution #3835

@schlessera

Description

@schlessera

There are several scenarios where commands fail because some of their dependencies are not met. The error that results in this can appear in several spots:

  • when the actual command is run
  • when another command is run that depends on that command
  • when WP-CLI is run

While the two first error cases are not very elegant when working with WP-CLI, the third one is a hurdle a lot of people don't seem to be able to overcome. When something is wrong with their DB, they might not even be able to display the help screen.

To provide a generalized solution to overcome this, I'd like to look into providing a simple and flexible dependency resolution mechanism, with the ability to let commands that are currently installed remain inactive until all its dependencies are met.

Here's a mockup of what the user would see (in this example, with an invalid DB configuration):
commands-dependency-mockup

This would keep WP-CLI working even when some dependencies are not met, and it would give clear indications to the user about what is currently missing for the command they need.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions