Codeception / Stub

Flexible Stub wrapper for PHPUnit's Mock Builder
MIT License
295 stars 17 forks source link

Make stubs more SA-friendly via @template #25

Closed ostrolucky closed 4 years ago

ostrolucky commented 4 years ago

Fixes #24

Naktibalda commented 4 years ago

Why did you use different annotations than PHPUnit?
It would be easier to filter out @psalm- annotations from auto-generated documentation pages if these new types make https://codeception.com/docs/reference/Stub look even uglier.

ostrolucky commented 4 years ago

Because @psalm- is vendor specific. When annotations in phpunit were added, this annotation wasn't standardized yet. Nowadays, pretty much all tools support it and is recommended to use it, see https://phpstan.org/blog/generics-in-php-using-phpdocs and https://psalm.dev/docs/annotating_code/templated_annotations/

Naktibalda commented 4 years ago

Released as 3.7.0, this version is only compatible with PHPUnit ^8.4 and ^9.0.