Carbon v3 deprecates the "diff real" functions, and throws a deprecated. It automatically routes the request to the function it thinks best, which in this case is diffInRealMinutes (see Carbon\Traits\Date::callDiffAlias() for details on why).
Since we are aiming to support both, I split the code into a conditional, calling the appropriate function. It also now returns a float, so it's necessary to cast round result to int - as it too will return a float.
I also added a test pipeline specifically for carbon 3, since nothing requires it specifically right now.
Description
Fixes #260
Checklist:
[x] I've added tests for my changes or tests are not applicable
[x] I've changed documentations or changes are not required
Carbon v3 deprecates the "diff real" functions, and throws a deprecated. It automatically routes the request to the function it thinks best, which in this case is
diffInRealMinutes
(see Carbon\Traits\Date::callDiffAlias() for details on why).Since we are aiming to support both, I split the code into a conditional, calling the appropriate function. It also now returns a float, so it's necessary to cast round result to int - as it too will return a float.
I also added a test pipeline specifically for carbon 3, since nothing requires it specifically right now.
Description
Fixes #260
Checklist:
CHANGELOG.md