Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[RFC]: Mark PhpDb\Sql abstract classes and interfaces @api or @internal

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
documentation

調査の方向性

#204 のドキュブロック型付けを適用した後、mago analyze --ignore-baseline src/Sql を実行して 16 件の missing-api-or-internal の指摘を一覧化し、src/Sql 配下の各名前付きインターフェースおよび抽象クラスに @api ドキュブロックを追加する。提案 3 については、AbstractSql を特定し、その protected メソッドの呼び出し箇所を確認して、どれが @internal かを判断する。analyze の実行がゼロ件の指摘を報告し、baseline のエントリが削除されたら完了。

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

説明

RFC
Proposed Version

Next minor

Basic Information

Mago reports 16 missing-api-or-internal findings in src/Sql, all baselined. Each one is an abstract class or interface without an @api or @internal annotation:

  • Abstract classes: AbstractSql, AbstractPreparableSql, AbstractExpression, Ddl\Column\{AbstractLengthColumn, AbstractPrecisionColumn, AbstractTimestampColumn}, Ddl\Constraint\AbstractConstraint, Ddl\Index\AbstractIndex
  • Interfaces: SqlInterface, PreparableSqlInterface, ExpressionInterface, ArgumentInterface, PredicateInterface, Platform\PlatformDecoratorInterface, Ddl\Column\ColumnInterface, Ddl\Constraint\ConstraintInterface
Background

These are the types the driver packages and applications build on: decorators extend the statement classes through AbstractSql and AbstractPreparableSql, and implement PlatformDecoratorInterface (see #175). Metadata marked its source classes @api.

Considerations
  • The annotations are documentation only, with no runtime effect.
  • @api commits to keeping a type's public and protected surface stable within a minor release. @internal tells consumers not to depend on it.
Proposal(s)
  1. Mark every interface above @api.
  2. Mark the abstract classes @api, since drivers extend them.
  3. Mark protected methods of AbstractSql that only the library itself calls @internal, so they can change without a major release.
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 ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

php-db/phpdb のほかの issue

php-db/phpdb の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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