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

Remove pre-WP5.2 PHP polyfill code, including test code #5875

Closed
felixarntz opened this issue Sep 21, 2022 · 3 comments
Closed

Remove pre-WP5.2 PHP polyfill code, including test code #5875

felixarntz opened this issue Sep 21, 2022 · 3 comments
Labels
P0 High priority Type: Enhancement Improvement of an existing feature

Comments

@felixarntz
Copy link
Member

felixarntz commented Sep 21, 2022

🚨 Note: do not merge until Release 1.88.0 🚨

Together with bumping the minimum WordPress version requirement to 5.2 (see #5874), we should remove any polyfill code that is only in Site Kit for WordPress versions lower than 5.2.


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

Acceptance criteria

  • Any polyfill code that is only present in the plugin to cater for WordPress versions below 5.2 (i.e. any WordPress version between 4.7 and 5.1) should be removed.
  • This should apply to the entire codebase (PHP and JS, production code and test/utility code).

Implementation Brief

This can be started, but it must not be merged until develop is open for the 1.88.0 release. When you open a pull request for this issue, please add the same annotation to the top of the PR to minimize the chance of an accidental early merge. :)

  • Remove BC_Functions::rest_preload_api_request and BC_Functions::load_script_textdomain methods.
  • Update the above methods' usage to use them directly from WordPress instead.
  • Delete packages/wp-phpunit-polyfill directory and remove it as a dependency in composer.json.

Test Coverage

  • Fix any failing tests.

QA Brief

  • This PR doesn't include any visual/behavioural changes. This just changes how a few methods are sourced in the back-end.
  • To ensure there is no regression, you can go through setting up Site Kit, setting up modules, and verifying everything loads and looks well in the Site Kit Dashboard and Settings.
  • Verify that there are no console errors or network request failures.

Changelog entry

  • Remove now unnecessary polyfills for WordPress versions older than 5.2, according to new version requirement.
@felixarntz felixarntz added P0 High priority Type: Enhancement Improvement of an existing feature labels Sep 21, 2022
@felixarntz felixarntz assigned felixarntz and unassigned felixarntz Sep 21, 2022
@hussain-t hussain-t self-assigned this Oct 6, 2022
@hussain-t hussain-t removed their assignment Oct 20, 2022
@techanvil techanvil self-assigned this Oct 20, 2022
@techanvil
Copy link
Collaborator

IB ✅

@techanvil techanvil removed their assignment Oct 20, 2022
@nfmohit nfmohit self-assigned this Oct 25, 2022
@nfmohit nfmohit removed their assignment Oct 26, 2022
@techanvil techanvil assigned techanvil and unassigned techanvil Oct 26, 2022
@tofumatt tofumatt self-assigned this Oct 27, 2022
@tofumatt
Copy link
Collaborator

Moving this to the next sprint and adding a note to the issue that this shouldn't be merged until 1.88.0. 👍🏻

@tofumatt tofumatt removed their assignment Oct 28, 2022
@nfmohit nfmohit assigned techanvil and unassigned nfmohit Nov 8, 2022
techanvil added a commit that referenced this issue Nov 8, 2022
@techanvil techanvil removed their assignment Nov 8, 2022
@wpdarren wpdarren self-assigned this Nov 8, 2022
@wpdarren
Copy link
Collaborator

wpdarren commented Nov 8, 2022

QA Update: ✅

Verified:

  • Ensured there are no regressions when going through setting up Site Kit, setting up modules.
  • Verified everything loads in the Site Kit Dashboard and Settings.
  • There are no console errors or network request failures.

@wpdarren wpdarren removed their assignment Nov 8, 2022
@felixarntz felixarntz self-assigned this Nov 17, 2022
@felixarntz felixarntz removed their assignment Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

7 participants