You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we have two separate code paths that deal with setting values in the wp-config.php file. While we created a new library wp-cli/wp-config-transformer to deal with config file manipulations, we still have old commands like wp config create that use their own logic to set the config values.
This means that for any validation logic we want to provide, we'd need to include it into both code paths.
To improve this situation, I'd like to refactor the old wp config create command to just render the mustache template with default values, and then pass all provided arguments through wp-cli/wp-config-transformer to set the config entries to the requested values. This way, we can concentrate all actual validation logic in wp-cli/wp-config-transformer, and the commands are all just shallow wrappings around that library.
Right now we have two separate code paths that deal with setting values in the
wp-config.php
file. While we created a new librarywp-cli/wp-config-transformer
to deal with config file manipulations, we still have old commands likewp config create
that use their own logic to set the config values.This means that for any validation logic we want to provide, we'd need to include it into both code paths.
To improve this situation, I'd like to refactor the old
wp config create
command to just render the mustache template with default values, and then pass all provided arguments throughwp-cli/wp-config-transformer
to set the config entries to the requested values. This way, we can concentrate all actual validation logic inwp-cli/wp-config-transformer
, and the commands are all just shallow wrappings around that library.cc @fjarrett
The text was updated successfully, but these errors were encountered: