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
… null. (#41084)
* Env: Allow skipping setting a configuration value by specifying it as null. Fixes#41083
* Env: Add a changelog entry for skipping a constant.
* Env: Document how to override wp-config defaults, and how to prevent them being defined entirely.
Description
When using wp-env, it's not possible to NOT set the
WP_ENVIRONMENT_TYPE
constant at all.This is problematic when wp-env is being used as part of unit testing, which may require changing the environment type dynamically.
One can arbitrarily set the constant value through a
config
mapping, but one cannot remove it.This is problematic for unit testing, as the value of the constant (valid or not) is used as-is within WordPress (See wp_get_environment_type() - which is another thing to discuss)
Step-by-step reproduction instructions
(Note, I've also tried '""' and null)
Still defined:
Screenshots, screen recording, code snippet
No response
Environment info
WP-env version:
@wordpress/[email protected]
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: