Initial review thoughts

オープン
#1 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

This is a set of open design questions rather than a defined change: whether to match Core's one-class-per-domain shape instead of one WP_Ability subclass per ability, whether to ship an autoloader so the newest copy of the package wins, and which namespaces (wp, core, wordpress) content write abilities should use. Read the package docs on namespaces and the migrated content write abilities first. Done means maintainers reach a decision on each point, and the outcome is recorded in the issue or in follow-up issues.

索引モデルが issue の本文から書いたものです。

説明

Figured it might be better to drop this here than as a comment in Slack. This is just some thoughts I had doing an initial review, feel free to disregard any of these though :)

Match WordPress Core's ability shape

This may not be the main goal here but if we want to eventually port Abilities into WordPress Core, it may be easier to do that if our structure matches Core's structure. The main difference here is Core ships one class per domain and we use one WP_Ability subclass per ability, each of which implements a bunch of abstract methods.

I think this is a cleaner approach and does match more closely what we do in the AI plugin but doesn't match what Core does. So potentially a decision point to make here on how we want to proceed.

Should we ship an autoloader?

Right now we put the loading of things on the consumer. I'm mostly okay with this but it does mean if someone is using multiple plugins that utilize this package, whichever plugin loads first wins (meaning you could end up with missing abilities or older abilities).

Wondering if we should ship a small autoloader, like Action Scheduler, that ensures the "newest" version of the package always wins if multiple copies are loaded.

Should the content write abilities use core or wp as the namespace?

The content write abilities that were migrated from the AI plugin use the core namespace, though the documentation in this package say you should use wp until a core proposal has landed. Not a big deal but a mismatch between code and docs.

And personal opinion, not sure we need wp, core and wordpress as namespaces here. Likely fine to have just wp and core, though maybe I'm missing a use case? Just don't want to overcomplicate things out of the box (I feel like some of the process docs we have here are already getting a bit complex for an initial version of things).

主要言語
PHP
スター
4
フォーク
4
平均マージ
2日 8時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WordPress/abilities のほかの issue

WordPress/abilities の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。