-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Plugin: Resolve warning notice displayed for deprecated function #13446
Conversation
bin/install-wordpress.sh
Outdated
@@ -87,6 +87,10 @@ if [ "$CURRENT_URL" != "http://localhost:$HOST_PORT" ]; then | |||
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI option update siteurl "http://localhost:$HOST_PORT" --quiet | |||
fi | |||
|
|||
# Configure site constants. | |||
echo -e $(status_message "Configuring site constants...") | |||
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI config set WP_DEBUG true --quiet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to run the e2e tests in debug mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's risky but we can give it a try and see if it doesn't make the experience harder.
By the way, it would solve the issue @iseulde was trying to tackle earlier. Maybe we could put it behind some flag? It seems to be very useful when developing locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #12457 for reference. Let's make we close the other one if we decide to land this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now see that it's different SCRIPT_DEBUG
vs WP_DEBUG
. I think I should finish my work for today 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what would be risky about it. I run with WP_DEBUG
constantly in my development environment, exactly to be able to catch an issue like this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was:
Could a debug environment be different from a regular prod environment we should mimic in tests.
I don't have objections though.
There e2e test failures which don't make too much sense to me. They seem to be unrelated. |
Trying to debug what's going on with the end-to-end tests, I'm inclined to think there could be some race condition where Interestingly, it seems to work correctly when bumping Puppeteer to the latest version; though I'm not sure what would have changed. It seems like it could still remain prone to race conditions (same applies to any page evaluations we do which aren't "blocking" some other action from taking place). |
1787e0b
to
f909853
Compare
In the interest of fixing the bug earlier than later, I've extracted the problematic E2E enhancements to a separate pull request at #13452 . |
f909853
to
8733812
Compare
I must have messed up the rebase, squashing instead of dropping commits. It's now back to the three line change it's meant to be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
…rnmobile/372-add-title-to-gutenberg-mobile * 'master' of https://github.com/WordPress/gutenberg: (56 commits) Save package-lock.json file changes (#13481) Plugin: Deprecate gutenberg_add_responsive_body_class (#13461) Add speak messages to the feature toggle component. (#13385) Plugin: Deprecate gutenberg_kses_allowedtags (#13460) Plugin: Deprecate gutenberg_bulk_post_updated_messages (#13472) Plugin: Avoid calling deprecated gutenberg_silence_rest_errors (#13446) Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473) Fix: Categories block: add custom classes only to wrapper (#13439) is-shallow-equal: Use ES5 ruleset from eslint-plugin module (#13428) Update and Organize Contributors Guide per #12916 (#13352) Dismissible-notices: fix text overlapping icon (X) (#13371) Framework: Remove 5.0-merged REST API integrations (#13408) Plugin: Remove 5.0-merged block registration functions, integrations (#13412) Framework: Bump minimum required WP to 5.x (#13370) [Mobile] Improve keyboard hide button (#13415) Improve castError handling of non strings (#13315) Fix: File block add custom class (#13432) Consider making Fullscreen Mode effects visible only on larger screens (#13425) Update plugin version to 4.9.0 (#13436) DateTimePicker: fix prop warning for (#12933) ...
Regression introduced in: #13408
This pull request seeks to resolve an issue where a warning notice is printed to the page when the site is configured to use the
WP_DEBUG
constant. Further, it adds a newobservePageWarnings
to@wordpress/e2e-test-utils
, used in the end-to-end test suite to fail tests immediately if there are any warnings present on the page.Testing instructions:
Verify end-to-end tests pass:
Verify end-to-end tests fail after
git revert 5c604f5
in your local copy of the branch: