[wp-trac] [WordPress Trac] #56179: Tools: Automate backporting core blocks from Gutenberg to Core
WordPress Trac
noreply at wordpress.org
Fri Jul 8 12:20:24 UTC 2022
#56179: Tools: Automate backporting core blocks from Gutenberg to Core
------------------------------+-----------------------
Reporter: gziolo | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version:
Severity: normal | Keywords: has-patch
Focuses: |
------------------------------+-----------------------
Follow up for #55642.
Syncing stable blocks from the Gutenberg repository to `wordpress-develop`
is currently a manual process, but it can be automated.
The proposed workflow:
1. Read all the block.json files from the `@wordpress/block-library`
directory.
2. Pick the ones without `__experimental` restrictions – these are the
stable blocks.
3. Use that list to generate PHP code that requires appropriate dynamic
blocks PHP files.
4. Use that list to generate PHP code that calls `remove_action` with
appropriate arguments in PHP unit tests.
5. Use that list yet again in webpack config, instead of the hardcoded
one.
To make the process smooth, require and remove_action calls can be
extracted to separate PHP files that can be easily autogenerated and
overwritten:
- `wp-includes/blocks/require-dynamic-blocks.php`
- `wp-includes/blocks/require-static-blocks.php`
- `tests/phpunit/includes/unregister-blocks-hooks.php`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56179>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list