support for class-string-map<T of Foo>
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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! 🎉
- Dominant language
- PHP
- Stars
- 1.5k
- Forks
- 78
- Avg merge
- 9h 5m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpstan/phpdoc-parser
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
phpstan/phpdoc-parser#317 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
phpstan/phpdoc-parser#271 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
phpstan/phpdoc-parser#219 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
phpstan/phpdoc-parser#178 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
phpstan/phpdoc-parser#173 · 1 comment ·
All issues in phpstan/phpdoc-parser
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·