webonyx / graphql-php

PHP implementation of the GraphQL specification based on the reference implementation in JavaScript
https://webonyx.github.io/graphql-php
MIT License
4.64k stars 564 forks source link

feat: narrow errors type to list #1597

Closed simPod closed 1 month ago

spawnia commented 1 month ago

Thank you, released with https://github.com/webonyx/graphql-php/releases/tag/v15.14.1.

shadowhand commented 1 month ago

TIL about list as a type hint. 🙇🏽‍♂️

simPod commented 1 month ago

@shadowhand check this out https://phpstan.org/writing-php-code/phpdoc-types

shadowhand commented 1 month ago

@simPod ah, because list has only existed since phpstan 1.9.0 and later. I knew of Foo[] but not list<Foo>. 👍🏼