Releases: codebyray/laravel-review-rateable
v2.1.1
Release: v2.1.1 – PHP 8.4 Compatibility Fixes
This patch release resolves PHP 8.4 deprecation notices related to implicitly nullable parameters while maintaining full backward compatibility with existing codebases.
✅ Fixes
• Converted implicitly nullable parameters to explicitly nullable (?type = null) to prevent PHP 8.4 deprecation warnings.
• Updated service method return types for consistency with contract and trait behavior.
• Ensured typed $model property in ReviewRateableService is initialized to prevent uninitialized access errors.
🧪 Tests
• Added test coverage for:
• Calling methods with no ID / null arguments (ensures graceful false return).
• Service method delegation behaviors.
• Handling service calls before setModel() invocation.
All tests pass successfully across supported PHP versions.
🔒 Backward Compatibility
• This is a non-breaking patch release.
• Default null parameter values remain in place to avoid breaking existing consumers.
• No functional behavior changes to public methods.
📦 Supported PHP Versions
• 8.1+ (tested up to 8.4)
v2.1.0
Added additional review/ratings options:
- getReviewsByDepartment() - Get all reviews (with attached ratings) for a department, filtered by the approved status.
- totalDepartmentReviews() - Get the total number of reviews for the model by department.
- ratingCounts() - Return an array of rating value ⇒ count, for the full model or for a given department.
- ratingStats() - Return a multi-dimensional array with various stats (see readme)
- getReviewsByRating() - Return reviews based on star ratings.
What's Changed
- 2.x by @codebyray in #59
- 2.x by @codebyray in #60
Full Changelog: v2.0...v2.1.0