Protect development mode constant from being re-defined #14165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When defining
GUTENBERG_DEVELOPMENT_MODE
inwp-config.php
and running Gutenbergmaster
directly from the repository, we'd see PHP warnings:We basically wanted to install Gutenberg (plugin version, not this repo) in development mode to Jetpack-Docker development environment by default. That's not a problem until someone runs Gutenberg from
master
and then gets these PHP warnings.Came up in Automattic/jetpack#11439 (review)
Now, I get this is in between
AUTO-GENERATED DEFINES
comments so there's probably a place somewhere else where I should PR. Happy to do so. :-)How has this been tested?
Define constant in your
wp-config.php
orwp-content/mu-plugins
folder and observe Gutenberg not trying to double-define it.Types of changes
Checklist: