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
{{ message }}
Repository navigation
Validate constants provided with --extra-php to avoid PHP notices #148
It adds the debug true, not seeing that by default debug false is already set. This creates warnings on every consecutive run of wp and also adds these to the log.
When doing wp config set WP_DEBUG true --raw instead, it changes the existing false setting to true, or creates it...
Should we be checking for these constants when adding them with --extra-php?
Should we be checking for these constants when adding them with --extra-php?
@ecotechie Interesting idea! I'm not sure how this would be technically possible, but I'm open to a pull request for it.
An alternative approach to consider: offer some explicit wp config create argument for setting a constant's value, and use WPConfigTransformer to manipulate the wp-config.php file.
changed the title [-]Using --extra-php does not validate/update constant[/-][+]Validate constants provided with --extra-php to avoid PHP notices[/+]on Nov 15, 2022
Activity
[-]Using --extra-php does not validate/update contant[/-][+]Using --extra-php does not validate/update constant[/+]danielbachhuber commentedon Nov 15, 2022
@ecotechie Interesting idea! I'm not sure how this would be technically possible, but I'm open to a pull request for it.
An alternative approach to consider: offer some explicit
wp config createargument for setting a constant's value, and useWPConfigTransformerto manipulate thewp-config.phpfile.[-]Using --extra-php does not validate/update constant[/-][+]Validate constants provided with --extra-php to avoid PHP notices[/+]swissspidy commentedon Feb 15, 2026
See #206 for that suggestion.