"New in initializers" breaks in docblock
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 42/100
Piste de recherche
Start with the linked PHPStan reproducer and trace how the parser handles the @method docblock syntax involving PHP 8.1 "new in initializers." Compare it with the equivalent syntax accepted in code. Done means the docblock case parses correctly and has regression coverage for the reported example.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug report
Since PHP 8.1, it is possible to use new as default parameters ("new in initializers" RFC).
PHPStan gets it perfectly, but things stop working once we move them to docblocks, explicitly the @method docblock (see example).
Code snippet that reproduces the problem
https://phpstan.org/r/5d0cdcbb-5c11-4483-90b0-b95986f92bc2
Expected output
Since PHPStan understands the "new in initializers" in the code, I guess that this is a missed use-case instead of an actual bug, but I didn't know where to report it.
Did PHPStan help you today? Did it make you happy in any way?
Every. single. day.
Thanks for this amazing tool!
- Langage dominant
- PHP
- Étoiles
- 1.5k
- Forks
- 78
- Merge moyen
- 9 h 5 min
- PR mergées (30 j)
- 5
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de phpstan/phpdoc-parser
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
phpstan/phpdoc-parser#317 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
phpstan/phpdoc-parser#281 · 2 commentaires · 1 réaction ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
phpstan/phpdoc-parser#271 · 1 commentaire · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
phpstan/phpdoc-parser#219 ·
-
Extension for custom tags Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
phpstan/phpdoc-parser#178 · 1 commentaire ·
Toutes les issues de phpstan/phpdoc-parser
Issues similaires
-
priority: p3
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Automattic/static-site-importer#1767 ·