Skip to content
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

WP Nightly E2E/PHP Unit tests are failing because of deprecation notice #7632

Closed
tofumatt opened this issue Sep 28, 2023 · 2 comments
Closed
Labels
P0 High priority Type: Infrastructure Engineering infrastructure & tooling

Comments

@tofumatt
Copy link
Collaborator

tofumatt commented Sep 28, 2023

Bug Description

WP Nightly PHP Unit tests and E2E tests are failing because of this message:

Function print_emoji_styles is deprecated since version 6.4.0! Use wp_enqueue_emoji_styles instead.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • PHP Unit tests should not fail on WordPress Nightly (due to the print_emoji_styles issue).
  • E2E tests should not fail because of a deprecation notice being surfaced.

Implementation Brief

Part of this is straightforward: we need to remove a few lines in our PHP Unit tests that remove all actions in 'wp_enqueue_scripts'. It seems there used to be issues with these actions running in CI but it's now fine after running them multiple times, and it prevents the PHP Unit issues in WP 6.4.

For the E2E tests, the issue is upstream in the AMP plugin, which is what is causing WP Nightly to fail: ampproject/amp-wp#7619. The plugin calls _admin_bar_bump_cb which triggers a deprecation notice in WordPress 6.4. I've filed the upstream bug, but we need to wait for them to fix it I think so for now we should ignore the warning with a note about it needing the upstream fix.

  • Remove this code from tests/phpunit/integration/Modules/AnalyticsTest.php.
remove_all_actions( 'wp_enqueue_scripts' );
  • Add an entry to the E2E test ignore log for the deprecated callback the AMP plugin triggers, only for nightly versions.

See PR at #7646.

Note to IB Reviewer: feel free to move this directly to Code Review as the execution is already complete at #7646, and assign to me (@tofumatt) if you need any PR tweaks 🙂

Test Coverage

  • Update the above tests and ensure they pass.

QA Brief

Changelog entry

  • N/A
@tofumatt tofumatt added P0 High priority Type: Infrastructure Engineering infrastructure & tooling labels Sep 28, 2023
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Sep 28, 2023
@tofumatt tofumatt changed the title WP Nightly PHP Unit tests are failing WP Nightly E2E/PHP Unit tests are failing because of deprecation notice Sep 28, 2023
@tofumatt tofumatt removed their assignment Sep 29, 2023
@aaemnnosttv aaemnnosttv self-assigned this Oct 2, 2023
@aaemnnosttv
Copy link
Collaborator

IB ✅
Moving to CR 👍

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Oct 6, 2023

❌ Approval

This test is failing again because the line it is being triggered on has changed. The ignore matching we have in place is fragile due to the specific lines.

'PHP Deprecated: Function _admin_bar_bump_cb is deprecated since version 6.4.0! Use wp_enqueue_admin_bar_bump_styles instead. in /var/www/html/wp-includes/functions.php on line 6032',

@aaemnnosttv aaemnnosttv removed their assignment Oct 6, 2023
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Infrastructure Engineering infrastructure & tooling
Projects
None yet
Development

No branches or pull requests

2 participants