Skip to content

E2E tests broken in 1.4 branch #4174

@westonruter

Description

@westonruter

Bug Description

As reported in #4043, the E2E test job is failing in the 1.4 branch.

@pierlon writes:

The Gutenberg plugin failed to activate, which led to tests failing due to them being unable to find the case-sensitive words "Featured image" (see 1f842d3#diff-792685570ec094fec9f40f84e3af8d3bR25). Apparently WP CLI failed to install and activate Gutenberg due to clash in a function declaration (WP_CLI\UpgraderSkin::feedback($string) vs WP_Upgrader_Skin::feedback($string, ...$args).

On the 1.4 branch, WP CLI v2.3.0 is installed via Composer while within the Docker container v2.4.0 is used. Further investigation shows v2.3.0 uses WP_CLI\UpgraderSkin::feedback($string) while v2.4.0 on PHP > 5.6 (which is the case here) uses WP_Upgrader_Skin::feedback($string, ...$args), which leads me to speculate whether both versions are being loaded at the same time. Thoughts @schlessera?

The develop branch uses WP CLI v2.4.0 in both instances, however, which I think is why the error does not occur there.

And @schlessera replied:

This is due to a breaking change in WordPress Core 5.3. While making the move to PHP 5.6 code, the signature for the upgrader base class feedback() method changed from WP_Upgrader_Skin::feedback($string) to WP_Upgrader_Skin::feedback($string, ...$args).

WP-CLI 2.3.0 is compatible with older versions of WP (< 5.3) only, while WordPress Core 5.3+ requires WP-CLI 2.4.0+.

This is unfortunate, but that's WordPress' way of backward compatibility I'm afraid...

In case that wasn't clear, the solution is to use WP-CLI v2.4.0+ in the Docker container as well, as it seems to be using WP Core 5.3+.

No, the other way around, install WP-CLI 2.4.0+ on the v1.4 branch if you're using WP Core 5.3+ there. 🤪

Expected Behaviour

Just as the E2E test on develop is not failing, so too should the E2E job not fail in the 1.4 branch.

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

Additional context

  • WordPress version:
  • Plugin version:
  • Gutenberg plugin version (if applicable):
  • AMP plugin template mode:
  • PHP version:
  • OS:
  • Browser: [e.g. chrome, safari]
  • Device: [e.g. iPhone6]

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

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions