Fix test failures due to WP 6.4 change - #881
Conversation
|
I feel like we should reconsider the approach with how this function is handled in core. I don't see why the function still needs to be hooked into |
This was done for backward compatibility with existing code. It's a clunky DX, but it's a tradeoff between breaking BC and clunky DX. I don't feel strongly either way. cc @westonruter I've addressed your code feedback in a3bc55d. |
|
What is this about: |
Yes I saw that in the code comments, but I wonder if it actually addresses a real backward compatibility issue. |
Summary
As of the WordPress 6.4 release, our unit tests are failing. This hasn't happened yet in
trunk, but only because no PRs have been opened since the release. It is however obvious in https://github.com/WordPress/performance/actions/runs/6851370708/job/18627496026?pr=864.The failures happen simply because of deprecation warnings for
print_emoji_styles()which per core behavior remains added as a callback for thewp_print_stylesaction but normally gets removed via another core function before it would be executed. In certain custom situations though (such as tests), it may be necessary to manually remove it. Even core itself does that for example in https://github.com/WordPress/wordpress-develop/blob/d66ef46847e2340c613d0a01c36d4fcc4b5f3a6b/src/wp-includes/block-editor.php#L363.Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.