mikebronner / laravel-model-caching

Eloquent model-caching made easy.
MIT License
2.22k stars 212 forks source link

[Fix] Carbon v3 new method default parameter compatibility #469

Open daika7ana opened 3 weeks ago

daika7ana commented 3 weeks ago

Takes into account Carbon v3 new default parameter value on the diffInSeconds method.

Carbon v2 method blueprint:

public function diffInSeconds($date = null, $absolute = true)

Carbon v3 method blueprint:

public function diffInSeconds($date = null, bool $absolute = false): float

Fixes failing tests: https://github.com/mikebronner/laravel-model-caching/blob/a38c905790c73c43dac09790eec7f0972cd651cc/tests/Integration/CachedModelTest.php#L180