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

[RFC]: Standardise Constraint Naming in Metadata Source

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php
領域
databases

調査の方向性

Start with PhpDb\Metadata\Source\AbstractSource and compare the adapters under the adapter-namespace\MetaData\Source namespace to find where the laminas prefix is hardcoded. Implement the proposed configurable constraint prefix and verify that all metadata sources resolve names consistently, including the default behavior and custom-prefix validation.

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

説明

Proposed Version

0.6.0

Basic Information

Provide a mechanism for a component-wide standardisation of constraint naming. Currently 'laminas' is prepended to a constraint name across multiple adapters in the \MetaData\Source. Instead we should enforce this from within PhpDb\Metadata\Source\AbstractSource and allow this to be changed at a global level if desired.

Background

_laminas_ key was hardcoded to the file.

Considerations

Not a huge impact, other than to see that it is legacy.

Proposal(s)
protected string $constraintPrefix = '';

public function setConstraintPrefix(string $prefix): void
{
    // Ensure alphanumeric and remove leading/trailing underscore
}

protected function getResolvedConstraintPrefix(): string
{
    return '_' . $this->constraintPrefix . '_';
}

### Appendix/Additional Info

_No response_
主要言語
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 を短くまとめたダイジェスト。