-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
[FEATURE REQUEST] Allow dynamic configuration of the WP-CLI binary path via module configuration #764
Comments
This adds support and tests for the `bin` configuration parameter in the `WPCLI` module. Fixes #764
Ciao, thank you for taking the time to open an issue and provide a possible solution. I think you're making a good case and it would improve the experience for those user requiring it.
Let me know. |
This adds support and tests for the `bin` configuration parameter in the `WPCLI` module. Fixes #764
Thank you, it works as expected, I noticed one thing, the |
Good call. I've pushed a commit to address that on the branch. |
Perfect, it works like a charm 😊 |
Thank you for confirming, I've released this in version |
Thank you too. |
Ciao Luca,
Is your feature request related to a problem? Please describe.
Currently, the
CliProcess
class always uses a hardcoded location for thewp-cli.phar
binary and if the file is not found, it will download the binary, so an internet connection is required.This approach limits flexibility, as users cannot dynamically define or override the WP-CLI binary path through the module configuration or suite settings. For example, if a custom version of WP-CLI is required, users must manually replace the default binary instead of specifying a custom path or if the binary is already present in the project.
Describe the solution you'd like
I would like the ability to specify the WP-CLI binary path through the module configuration using a new key, such as
bin
. This configuration should propagate toCliProcess
to dynamically set the binary path, allowing users to define their own WP-CLI binary without modifying the default implementation.Example configuration:
The
CliProcess
class could support a method likesetBin
or a new parameter in the constructor to accept and use this custom path, and if no path is provided, it should default to the current behavior.Describe alternatives you've considered
wp-cli.phar
in the output directory (codecept_output_dir('bin')
). This approach is not user-friendly and complicates automated workflows.WPCLI
or creating a custom implementation to handle the binary configuration. This introduces additional maintenance overhead.Additional context
This feature would make the library more flexible and better suited for environments where multiple versions of WP-CLI are required or where users already have custom binaries. It would also align with the overall modular and configurable nature of Codeception modules.
The text was updated successfully, but these errors were encountered: