You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We all know that PHP is super awesome, of course! But it lacks some handy tooling, like generics, for example. While they are currently being re-evaluated, we're still years away from any kind of actual implementation.
Tools like Psalm or PHPStan (living in the phpdocs) would help our IDEs when dealing with the Collection and Itemresponses, providing better type inference for the entities they entail.
Psalm vs PHPStan
PHPStan is already supported by Illuminate\Support\Collection (and has more stars on GitHub), making it my preferred option.
For clarity, I'm not opting for making this package target some PHPStan level, just adding some @template-annotations for making our lives (and that of our IDE's) a little bit easier.
The text was updated successfully, but these errors were encountered:
We all know that PHP is super awesome, of course! But it lacks some handy tooling, like generics, for example. While they are currently being re-evaluated, we're still years away from any kind of actual implementation.
Tools like Psalm or PHPStan (living in the phpdocs) would help our IDEs when dealing with the
Collection
andItem
responses, providing better type inference for the entities they entail.Psalm vs PHPStan
PHPStan is already supported by Illuminate\Support\Collection (and has more stars on GitHub), making it my preferred option.
For clarity, I'm not opting for making this package target some PHPStan level, just adding some
@template
-annotations for making our lives (and that of our IDE's) a little bit easier.The text was updated successfully, but these errors were encountered: