Conversation
|
Some further changes were introduced: Compatibility with WP 5.6There are still users on WP 5.6+ using this plugin therefore we're ensuring this version keeps being supported for now. This required some changes:
JSX transform
To fix this, the babel-loader rule from A ProvidePlugin entry injects React from @wordpress/element into any module that references it, so JSX files don't need an explicit import. wp-element has been available since WP 5.0, making this safe across all Compatibility with PHP 7.4While manually testing this on WP 5.6 and PHP 7.4, I noticed a fatal error related to I performed an audit to check for any other PHP 8 only features being used but didn't find any. |
Approach
Some notable exceptions of issues that couldn't be resolved:
Gallery settings page
The suggested replacement is still marked as experimental. It would be risky to use an experimental component that might change its API within our plugin (our linter advice against it too). Remaining on the deprecated (but still working) component seems safer.
Gallery block
The gallery block styling is enqueued via the
enqueue_block_editor_assetshook at the moment. Ideally we should migrate to using ablock.jsonfile combined witheditorStyleproperty... however the structural changes are quite large so we might need to have a separate refactor task to upgrade the gallery block to apiVersion 3 withblock.jsonsupport.apiVersion 3 means full iframe support within the editor. Unfortunately this doesn't work well with the current structure of this block, as it's currently loading the gallery widget for a live preview within the editor. This is sort of related to the above issue.
QA notes