[wp-trac] [WordPress Trac] #57197: Add some basic test coverage for the Gutenberg plugin

WordPress Trac noreply at wordpress.org
Thu Nov 24 14:42:10 UTC 2022


#57197: Add some basic test coverage for the Gutenberg plugin
------------------------------+-----------------------------
 Reporter:  Bernhard Reiter   |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 During preparation for the 6.1 release, we saw an issue with duplicated
 function names in Core and the Gutenberg plugin which would cause fatal
 errors when running the stable version of the Gutenberg plugin on a
 WordPress install that was running Core `trunk`.

 Specifically, this was caused by [54118] (which was based on
 [https://github.com/WordPress/wordpress-develop/pull/3206 this PR]): It
 introduced `wp_add_global_styles_for_blocks` to Core, while the same
 function was also still declared in Gutenberg (with no `function_exists`
 guards or the like). Thus, it lead to a naming collision.

 We already have some safeguards in place -- e.g. all PRs in the Gutenberg
 repo are run against Core `trunk`. While that did cause all subsequent PRs
 filed in the ''Gutenberg'' repo to fail (and eventually prompted
 @wildworks to file a [https://github.com/WordPress/gutenberg/pull/44052
 fix]), it went unnoticed by Core developers for a while, since there are
 no safeguards on the ''Core'' side.

 I thus propose adding minimal coverage to `wordpress-develop`'s CI that
 attempts to activate and install the Gutenberg plugin. That would be
 enough to catch any fatal errors as described above, while adding minimal
 overhead on the Core/`wordpress-develop` side.

 IMO, it's reasonable to add this for a feature plugin whose code is by
 definition planned to be eventually merged into Core.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57197>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list