Extension for custom tags

Offen
#178 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Aktiv
Tech-Stack
php
Bereich
devtools

Rechercherichtung

Start by tracing how PhpDoc input containing custom tags is parsed and where it currently fails before reaching TypeNodeResolverExtension. Define the parser and extension behavior needed for tuple and shape tags, then verify that those tags reach the extension's resolve call without breaking existing PhpDoc parsing.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Description

It would be cool to see the extension for custom tags.

We have our own tags that describe Array shapes as in PhpStan:

/**
 * @param tuple(T1, T2, ..., Tn) $tuple
 * @param shape(k1:T1, k2:T2, ..., kn:Tn) $shape
 */
Why?

I want to make an extension for PhpStan, which through TypeNodeResolverExtension, would be able to tell what type is here.

Problem

At the moment, the problem occurs while parsing a PhpDoc and does not reach the resolve call of TypeNodeResolverExtension.

Vorherrschende Sprache
PHP
Sterne
1.5k
Forks
78
Ø Merge
9 Std. 5 Min.
Gemergte PRs (30 T.)
5

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

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 phpstan/phpdoc-parser

Alle Issues in phpstan/phpdoc-parser

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

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