Open naqirizvi opened 1 year ago
Thanks for the report, @naqirizvi
I'm unable to reproduce the issue on my local machine:
$ wp config set foo bar
Success: Added the constant 'foo' to the 'wp-config.php' file with the value 'bar'.
$ wp cli info
OS: Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64
Shell: /bin/zsh
PHP binary: /opt/homebrew/bin/php
PHP version: 8.0.27
php.ini used: /opt/homebrew/etc/php/8.0/php.ini
MySQL binary: /opt/homebrew/bin/mysql
MySQL version: mysql Ver 8.0.32 for macos13.0 on arm64 (Homebrew)
SQL modes:
WP-CLI root dir: /Users/danielbachhuber/projects/wp-cli-dev/wp-cli
WP-CLI vendor dir: /Users/danielbachhuber/projects/wp-cli-dev/wp-cli/vendor
WP_CLI phar path:
WP-CLI packages dir: /Users/danielbachhuber/wp-cli/packages/
WP-CLI cache dir: /Users/danielbachhuber/.wp-cli/cache
WP-CLI global config: /Users/danielbachhuber/.wp-cli/config.yml
WP-CLI project config: /Users/danielbachhuber/projects/vanilla/wp-cli.yml
WP-CLI version: 2.8.0-alpha
A few thoughts, to potentially help move this along:
wp-config.php
(with any secrets nulled out) so I can inspect it?wp-config-transformer
package that might be related https://github.com/wp-cli/wp-config-transformerFeel free to stop by the #cli
channel on WordPress.org Slack if you'd like help debugging further.
Bug Report
Describe the current, buggy behavior wp config set foo bar is not working as expected and gives output
However, the anchor text is correct.
Expected Response:
Success: Added the constant 'foo' to the 'wp-config.php' file with the raw value 'bar'.
Environment:
Provide a possible solution Wp-config.php has the correct Anchor text. The issues are replicate able on a fresh install.
Provide additional context/Screenshots
When --raw is added the command works fine wp config set foo bar --raw