dereuromark / cakephp-queue

Queue plugin for CakePHP - simple, pure PHP and without dependencies.
MIT License
306 stars 137 forks source link

add generic type hint + helpful exception for ServicesTrait #415

Closed passchn closed 7 months ago

passchn commented 7 months ago

Related Issue: https://github.com/dereuromark/cakephp-queue/issues/414

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 70.86%. Comparing base (1c84005) to head (3dc1867).

Files Patch % Lines
src/Queue/ServicesTrait.php 40.00% 3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #415 +/- ## ============================================ - Coverage 70.94% 70.86% -0.08% - Complexity 698 699 +1 ============================================ Files 37 37 Lines 2433 2437 +4 ============================================ + Hits 1726 1727 +1 - Misses 707 710 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

passchn commented 7 months ago

Updated the type variable as OBJECT is misleading and the PHPStan docs use T: https://phpstan.org/blog/generics-in-php-using-phpdocs#class-names

dereuromark commented 7 months ago

We will have to backport this to 5.x branch for Patch release

dereuromark commented 7 months ago

Backport done in https://github.com/dereuromark/cakephp-queue/commit/0ff769f2c737a649f28996e440c3f5f53e05fc96