-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[11.x] Fix deprecation warning caused by Carbon 3.2 #50813
Conversation
Hello, sorry the deprecation is misformed, it should be written diffInUTCSeconds, but with any unit smaller than day, timezone has no impact, so indeed diffInSeconds is a good replacement. |
As a side note, "Real" alias methods will remain available for the whole life of 3.x |
@driesvints Can this be tagged for release today, or should we downgrade Carbon temporarily? I imagine it'll fill up a lot of logs in the meantime as it hits on every request. |
@jackwh not sure why deprecations are hitting you in production? |
@driesvints New Relic still processes deprecations in production, even when disabled in Laravel. And of course it's just an annoyance in local development as well, with tools like Ray becoming nearly unusable. |
Sorry I don't get this point neither, you have local development tool that check runtime-deprecation notices? 🤔 I would reconsider the plan for deprecation if needed. But I would need to understand exactly which tool complains about what. Deprecation is a way to offer a notice ahead of later changes. So the whole point is that it's actually not an emergency to be changed in the minute. If a third-party tool defeats this purpose, I think it's worth to check if it has options (such as way of acknowledging a particular deprecation so not to be raised again). If it has not, it would be relevant to open a discussions on with the maintainers of tools. |
@kylekatarnls I agree with you and have no issue with how Carbon (or any other dependency) raises deprecation notices 👍 I only suggested releasing this sooner as I know Laravel values a good developer experience, and given this single isolated call to a deprecated function logs on every framework request, it would be nice if we didn't have to work around it for a week before the next release. Thanks for your hard work on Carbon ❤️ |
We released this last Thursday btw 👍 |
Since running
composer update
today, I noticed deprecation errors being logged for every Laravel request to my app:I've replaced
diffInRealSeconds
withdiffInSeconds
to fix this, to retain compatibility with the Carbon v2 dependency as well.Here's the Carbon commit which caused this, released in 3.2 yesterday.