support for class-string-map<T of Foo>
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start by reviewing issue #246, PHPStan issue #9521, and the linked phpDocumentor TypeResolver issue to understand the proposed class-string-map syntax. Then examine how GenericType represents bounds and how the parser handles this syntax; done means an agreed representation and parser support that avoids a crash.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I was investigating the option to add support for class-string-map<T of Foo> and found #246, and also https://github.com/phpstan/phpstan/issues/9521. According to @ondrejmirtes in #246 this syntax should already be supported by this library. But is it not.
I'm wondering if we should introduce the syntax, and how this would look like. I can help with the implementation in the parser. But not without an agreement on how this would work on the GenericType.
I would suggest to add a $bound type on the GenericType which is equal to the behavior on @template
This is needed to the mentioned change in phpstan and https://github.com/phpDocumentor/TypeResolver/issues/266. Support in the parser would at least prevent a crash in the parser.
Thanks for this library! 🎉
- 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
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus phpstan/phpdoc-parser
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
phpstan/phpdoc-parser#317 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
phpstan/phpdoc-parser#271 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
phpstan/phpdoc-parser#219 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
phpstan/phpdoc-parser#178 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
phpstan/phpdoc-parser#173 · 1 Kommentar ·
Alle Issues in phpstan/phpdoc-parser
Ähnliche Issues
-
priority: p3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nextcloud/fulltextsearch#1011 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
coollabsio/coolify#11927 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100