Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix deprecation for carbon 3 #108

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tgabi333
Copy link

my laravel config is setup to log deprecations, i got this:

production.WARNING: ErrorException: Implicit conversion from float -1.9990081062193847 to int loses precision 
in /app/vendor/lucasdotvin/laravel-soulbscription/src/Enums/PeriodicityType.php:24

As Carbon documentation says:

diffAsCarbonInterval() and diffIn*() (and floatDiffIn*() for versions < 3 when diffIn*() methods returned integer values,
since Carbon 3, they are deprecated as diffIn*() already return floating number, and integer values from it can easily be
obtained with an explicit cast (int)).

@tgabi333
Copy link
Author

ping @lucasdotvin

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant