Add checks to detect jQuery 4 incompatibilities ahead of WordPress 7.2 / 7.3
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, jquery, php, wordpress
調査の方向性
Start by reading the existing React 19 compatibility check (#1356) and the check registration and test patterns it uses. Confirm the proposed API list against the jQuery 4.0 upgrade guide, then identify where plugin JavaScript and inline scripts are scanned. Done means the warning check is registered and documented, reports file, line, and replacement links, and has passing and failing fixtures with minified or vendored file behavior covered.
索引モデルが issue の本文から書いたものです。
説明
Background
WordPress 7.2 will ship with jQuery Migrate 3.6.0 to prepare for updating to jQuery 4 in core. The planned timeline, per Preparing for jQuery 4 with WordPress 7.2:
- WordPress 7.2: update jQuery Migrate to 3.6.0, so extenders can catch deprecation notices.
- WordPress 7.3 (tentative): update to the latest jQuery and jQuery Migrate, plus jQuery UI and other jQuery-dependent libraries.
- End of 2027 (WordPress 7.5 or 7.6): disable jQuery Migrate by default.
Progress is tracked in core ticket #60478.
Once Migrate is disabled by default, plugins that rely on APIs removed in jQuery 4 will break on the front end and in the admin. Plugin Check is well placed to help developers find these issues before submission.
Proposal
Add a static check, for example jquery_deprecated_apis, that scans plugin JS (and inline scripts where feasible) for jQuery APIs removed or deprecated in jQuery 4. Suggested starting list, to be confirmed against the jQuery 4.0 upgrade guide:
- Removed utilities:
jQuery.isArray,jQuery.parseJSON,jQuery.trim,jQuery.type,jQuery.now,jQuery.isNumeric,jQuery.isFunction,jQuery.isWindow,jQuery.camelCase,jQuery.nodeName - Removed or deprecated events and methods:
.bind(),.unbind(),.delegate(),.undelegate(),.hover(), shorthand event methods (.click(),.change(), etc.),.size() - Removed
jQuery.fn.push,.sort,.spliceusage - Behavior changes:
jQuery.ajaxand$.get/$.postdefaults,.data()and.attr()edge cases,.addClass()/.removeClass()with arrays
Severity: start as warning, so it does not block submissions while the timeline is still tentative. Promote to error once jQuery 4 lands in core.
Also consider:
- A check for
wp_enqueue_script()calls that bundle their own jQuery or deregister core's jQuery (related to #702). - A readme / docs section pointing developers to
SCRIPT_DEBUGand the jQuery Migrate console warnings in 7.2.
Acceptance criteria
- New check registered, with a category such as
plugin_repoorperformance, and documented. - Each flagged API reports file, line, and a link to the replacement.
- Unit tests with passing and failing fixtures.
- Minified / vendored files are skipped, or flagged separately.
- Docs updated.
Related
- #1356: React 19 incompatibilities check (same "warn about upcoming incompatibilities" approach)
- #702: check for libraries already in WP core, including jQuery (bundling, not deprecated APIs)
References
- 主要言語
- PHP
- スター
- 365
- フォーク
- 135
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WordPress/plugin-check のほかの issue
-
False positive trademarked_term warning for "wc" inside the word "Flowchart"対応中かも @anandrajaram21 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
WordPress/plugin-check#1556 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add opt-in .distignore exclusions for local and CI scans対応中かも @jakaria-istauk が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
WordPress/plugin-check#1559 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
WordPress/plugin-check#1557 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
WordPress/plugin-check#1555 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
PHPErrorReportingSniff flags debug constants used as values in const declarations対応中かも @elphizu が 7 日前に担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 35/100
WordPress/plugin-check#1553 ·
メンテナーはふだん 1 日以内に返信
WordPress/plugin-check の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ExpressionEngine/ExpressionEngine#5493 ·
メンテナーはふだん 5 日以内に返信
-
"Attempt to read property 'username' on null" error after a user is deleted対応中かも @dicksonlaw583 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
omeka/plugin-SimplePages#49 ·
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quantum-php/project#222 ·
-
support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信