Skip to content
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

Deprecation Notice #1631

MattHadfield113 opened this issue Feb 27, 2019 · 1 comment


None yet
2 participants
Copy link

commented Feb 27, 2019


I encountered an issue with the following code:

echo \Carbon\Carbon::parse('12 Hours from now')->diffInHours()

Carbon version: 2.14.0
PHP version: 7.3
Symfony/Translation Version: 4.2.3

I expected to get:


But I actually get:

Error: [16384] The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter.

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.



This comment has been minimized.

Copy link

commented Feb 27, 2019

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.