Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[RFC]: Standardise Constraint Naming in Metadata Source

Offen
#151 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
php
Bereich
databases

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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_
Vorherrschende Sprache
PHP
Sterne
18
Forks
8
Ø Merge
6 T. 11 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus php-db/phpdb

Alle Issues in php-db/phpdb

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.