Make WordPress Core

#58846 closed defect (bug) (fixed)

Global styles revisions: update private methods to protected

Reported by: ramonopoly's profile ramonopoly Owned by: audrasjb's profile audrasjb
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch fixed-major commit dev-reviewed
Focuses: Cc:

Description

The private vars and methods in the Global styles revisions rest API controller should be changed to be protected.

Why? So class entities that inherit from the base can use them, and Gutenberg can iterate on 6.3 features without having to copy over private methods to new classes all the time.

It would be nice to have this in 6.3 as it would create a seamless compatibility with Gutenberg.

If judged not to be eligible, then we could probably work around it in Gutenberg until the next release.

Change History (8)

This ticket was mentioned in PR #4867 on WordPress/wordpress-develop by @ramonopoly.


19 months ago
#1

Updates the private vars and methods in the Global styles revisions rest API controller to be protected.

Why? So class entities that inherit from the base can use them, and we can iterate on 6.3 features without having to copy over private methods to new classes all the time.

Gutenberg PR: https://github.com/WordPress/gutenberg/pull/52748

Trac ticket: https://core.trac.wordpress.org/ticket/58846

#2 @audrasjb
19 months ago

  • Owner set to audrasjb
  • Resolution set to fixed
  • Status changed from new to closed

In 56268:

REST API: Update Global styles revisions private methods to protected.

This changeset updates the private vars and methods in the Global styles revisions rest API controller to be protected, so class entities that inherit
from the base can use them, and to allow iterating on 6.3 features without having to copy over private methods to new classes.

Props ramonopoly.
Fixes #58846.

#4 @audrasjb
19 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 6.3 backport, pending a second committer sign-off.

#5 @ramonopoly
19 months ago

Reopening for 6.3 backport, pending a second committer sign-off.

Thank you @audrasjb !

#6 @spacedmonkey
19 months ago

@audrasjb I am signing off.

#7 @audrasjb
19 months ago

  • Keywords commit dev-reviewed added

Thank you @spacedmonkey ✌️

(tip: once you've signed-off, you can add the dev-reviewed keyword 🙂)

#8 @audrasjb
19 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 56275:

REST API: Update Global styles revisions private methods to protected.

This changeset updates the private vars and methods in the Global styles revisions rest API controller to be protected, so class entities that inherit
from the base can use them, and to allow iterating on 6.3 features without having to copy over private methods to new classes.

Props ramonopoly.
Reviewed by spacedmonkey.
Merges [56268] to the 6.3 branch.
Fixes #58846.

Note: See TracTickets for help on using tickets.