Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Deprecation Notice #1631
I encountered an issue with the following code:
echo \Carbon\Carbon::parse('12 Hours from now')->diffInHours()
Carbon version: 2.14.0
I expected to get:
But I actually get:
I have read the existing issue at #1548
The issue only appeared this morning, ive been using the library fine until i ran a composer update. This project is in core PHP, using composer to install the library.
The conclusion of #1548 is that deprecation notice should not throw an exception. You have to check your app/framework settings to set a proper error reporting level. And check if no dependencies override or ignore those settings.
In raw PHP for example:
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);