drupal-graphql / graphql

GraphQL integration for Drupal 9/10
287 stars 202 forks source link

[4.x] Backport type improvements as `@*` docblock annotations #1339

Open Kingdutch opened 1 year ago

Kingdutch commented 1 year ago

We plan to make type improvements in [#1338]. We can't port those to 4.x because they'd be breaking changes and sometimes the normal docblock types interfere with PHPCS. However we can use @* docblock annotations to backport the types and make them show up for everyone using PHPStan. That will help people get their 4.x code ready for 5.x

klausi commented 1 year ago

Hm, I don't think we need @phpstan- docblocks in many cases, we should fix Coder/PHPCS to not contradict PHPStan. Most work on that is already done or in progress, for example https://www.drupal.org/project/coder/issues/3205017

Kingdutch commented 1 year ago

Yeah you're absolutely right! My mind still has to get used to the fact that coder now supports those syntaxes which awesome! 🎉 Adjusted the issue accordingly.