[wp-trac] [WordPress Trac] #45097: Introduce WP_Block_Type and WP_Block_Type_Registry classes

WordPress Trac noreply at wordpress.org
Wed Oct 17 15:17:56 UTC 2018


#45097: Introduce WP_Block_Type and WP_Block_Type_Registry classes
--------------------------------------+-----------------------
 Reporter:  danielbachhuber           |       Owner:  desrosj
     Type:  task (blessed)            |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.0
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+-----------------------
Changes (by desrosj):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests


Comment:

 Handfull of minor changes in [attachment:"45097.3.diff"]:

 - Added a handful of missing `@since` tags.
 - `@access` and `@static` tags have been removed. Per the
 [https://make.wordpress.org/core/handbook/best-practices/inline-
 documentation-standards/php/#phpdoc-tags PHP Documentation Standards],
 these are no longer used, or not necessary.
 - Moved the `class-wp-dummy-block-type.php` into the
 `tests/phpunit/includes` folder from Gutenberg. This fixes the first
 failure @danielbachhuber was seeing. Also, renamed this class to
 `WP_Fake_Block_Type` to be more pleasant.
 - Removes `setup()` method from `WP_Test_Block_Type` (it was not
 performing any actions).
 - Adds missing visibility for methods in test classes.
 - Add missing `@since` and `@ticket` tags for test methods.

 I [https://travis-ci.org/desrosj/wordpress-develop/builds/442733682 also
 set up a build on my fork]. I am seeing the same issues as
 @danielbachhuber.

 I contemplated marking each test that requires `has_block()` skipped if
 the function does not exist. That would allow this to land and would turn
 the tests on later post-merge, but those skips should be removed after
 that. @danielbachhuber @adamsilverstein what are your thoughts on that?

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


More information about the wp-trac mailing list