[RFC]: Decide which PhpDb\Sql classes become final
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reviewing the listed classes under src/Sql and checking the driver packages for subclasses, especially the decorators described in #175 and phpdb-mysql's src/Sql/Ddl classes. Compare those findings with the proposed exclusions in mago.toml. Done means deciding which classes can become final, documenting exclusions for those that cannot, and resolving Platform\Platform alongside #175.
索引モデルが issue の本文から書いたものです。
説明
Proposed Version
Next major
Basic Information
Mago reports 44 class-must-be-final findings in src/Sql, all baselined. Resolving them means deciding which classes are extension points, which a mechanical fix can't do.
Classes reported:
- Statements:
Select,Delete,Update,InsertIgnore,Combine,Sql,Join,Where,Having,Platform\Platform - DDL:
Ddl\CreateTable,Ddl\AlterTable,Ddl\DropTable,Ddl\Index\Index, the 17 concreteDdl\Column\*classes, andDdl\Constraint\{Check, ForeignKey, PrimaryKey, UniqueKey} - Predicates:
Predicate\{Operator, Expression, Literal, IsNotNull, NotBetween, NotIn, NotLike} - Exceptions:
Predicate\Exception\{InvalidArgumentException, RuntimeException}
Background
The driver packages extend several of these classes:
- Every platform decorator extends
Select,Insert,Update,Delete,CreateTableorAlterTable(see #175). phpdb-mysqlships its own DDL decorators undersrc/Sql/Ddl.- The test suite subclasses
Delete,UpdateandInsert(DeleteIgnore,UpdateIgnore,Replace).
Metadata went through the same decision: its object classes were made final.
Considerations
- Making a class
finalbreaks every subclass of it. The statement and DDL classes that decorators extend cannot become final without replacing inheritance with composition. - Leaf predicates, concrete column types and the exception classes have no known subclasses.
Proposal(s)
- Make
finalthe classes with no known subclasses: the leaf predicates, thePredicate\Exceptionclasses,Join,WhereandHaving. Check the driver packages first. - Keep the statement and DDL classes non-final, and add a per-path
class-must-be-finalexclusion inmago.tomldocumenting why, as already done forprefer-self-return-type. - Settle
Platform\Platformas part of #175, which already proposes making it final.
Appendix/Additional Info
Finding counts are from mago analyze --ignore-baseline src/Sql once the docblock typing in #204 is applied.
- 主要言語
- PHP
- スター
- 18
- フォーク
- 8
- 平均マージ
- 6日 11時間
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php-db/phpdb のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
RFC
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
Sql's foreign-table guard raises TypeError when its table is a TableIdentifier or aliased array対応中かも @simon-mundy が 2 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
🧠 Admin
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
pluginsGLPI/tag#389 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 78/100
opencart/opencart#15763 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
support
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
opnsense/core#10976 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信