[wp-trac] [WordPress Trac] #60131: Global styles controllers: extend classes with WP_REST_Posts_Controller and WP_REST_Revisions_Controller

WordPress Trac noreply at wordpress.org
Tue Feb 13 21:04:30 UTC 2024


#60131: Global styles controllers: extend classes with WP_REST_Posts_Controller and
WP_REST_Revisions_Controller
-------------------------------------------------+-------------------------
 Reporter:  ramonopoly                           |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.5
Component:  REST API                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by ramonopoly):

 > I have reopened the PR and added a fix. This fix is really simple and
 makes the class backwards compatible. Need to reviews and testing if we
 want to get this committed in beta 2.

 @spacedmonkey Great stuff, thanks for the update.

 Looks good at first glance. I'll give it a run today.

 > The reason it was reverted, as the signuare of the
 WP_REST_Global_Styles_Revisions_Controller class found in core did not
 match the one found in gutenberg. As the constuctor and properties were
 different, this resulted in a PHP error, resulting in the e2e fail.

 Out of interest, which constructor's signature was the problem?

 This one?

 https://github.com/WordPress/gutenberg/blob/wp/6.3/lib/compat/wordpress-6.3
 /class-gutenberg-rest-global-styles-revisions-controller-6-3.php#L39

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60131#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list