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

Refactor config command to always validate in config transformer library #94

Open
schlessera opened this issue Jul 16, 2019 · 1 comment · Fixed by #181
Open

Refactor config command to always validate in config transformer library #94

schlessera opened this issue Jul 16, 2019 · 1 comment · Fixed by #181

Comments

@schlessera
Copy link
Member

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.

cc @fjarrett

@swissspidy
Copy link
Member

Reopening because #181 was reverted for the time being

@swissspidy swissspidy reopened this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants