Replace deprecated asset-loader enqueue_asset calls - #356
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMHr2xBUqLe6SuhHdpu7ow
Blocked: do not merge as-isShiro is deployed on sites other than wikimediafoundation.org, so the floor raise flagged in the description is a real breakage, not a theoretical one. Because Shiro declares no Composer requirement on asset-loader — the host site provides it — merging this would silently break asset loading on any site still on asset-loader < 0.8.0. Those sites would hit the Leaving this as a draft for reference. Options, roughly cheapest first:
Note that nothing here is urgent: the deprecated names still work through asset-loader 1.x. This only becomes blocking for a 2.x bump, where The related site-side bump is wpcomvip/wikimediafoundation-org#1088. That one is independent and safe to ship without this — it just logs deprecation notices until this lands. |
asset-loader 0.8.0 deprecated
enqueue_asset()forenqueue_manifest_asset(). Old name works through 1.x, removed in 2.x. Surfaced by wpcomvip/wikimediafoundation-org#1088.Changes
functions.php:129,inc/editor/namespace.php:333,342— renamed toenqueue_manifest_asset().functions.php:87— guard now probes the new name, so it doubles as the version check;trigger_errormessage names 0.8.0.Compatibility
?string→mixed(also accepts an array of candidate paths).nullstill safe:get_manifest_path()returnsnullimplicitly;register_manifest_asset()keeps theempty()guard and early return.Testing
phpcs(repo ruleset) andphp -lclean on both files.npm run lintnot run locally (no JS changed); CI covers it.Deployment —
releaseis 21 commits ahead ofmain; the site pinsdev-release. Targetsmainper convention, so it needs areleaselanding plus a pin update to reach the site.🤖 Generated with Claude Code
https://claude.ai/code/session_01VMHr2xBUqLe6SuhHdpu7ow