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

Make deprecation warnings opt-in #9216

Merged
merged 1 commit into from Jun 28, 2018

Conversation

Projects
None yet
6 participants
@eternoendless
Member

eternoendless commented Jun 26, 2018

Questions Answers
Branch? 1.7.4.x
Description? Avoid throwing an error when calling deprecated methods like ImageType::getFormatedName()
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? n/a
How to test?

image 1


This change is Reviewable

@eternoendless eternoendless added this to the 1.7.4.0 milestone Jun 26, 2018

@prestonBot prestonBot added the 1.7.4.x label Jun 26, 2018

@@ -2840,7 +2840,7 @@ public static function displayFileAsDeprecated()
protected static function throwDeprecated($error, $message, $class)
{
if (_PS_DISPLAY_COMPATIBILITY_WARNING_) {
trigger_error($error, E_USER_WARNING);
@trigger_error($error, E_USER_DEPRECATED);

This comment has been minimized.

@PierreRambaud

PierreRambaud Jun 26, 2018

Contributor

No need to add @

This comment has been minimized.

@PierreRambaud

PierreRambaud Jun 26, 2018

Contributor

I'm with error_reporting = E_ALL FYI

This comment has been minimized.

@eternoendless

eternoendless Jun 27, 2018

Member

Is @ mandatory? I remove it on my branch and nothing wrong happened.

That's how Symfony does it:

Without the @-silencing operator, users would need to opt-out from deprecation notices. Silencing swaps this behavior and allows users to opt-in when they are ready to cope with them (by adding a custom error handler like the one used by the Web Debug Toolbar or by the PHPUnit bridge).

This comment has been minimized.

@PierreRambaud
@PierreRambaud

Is @ mandatory? I remove it on my branch and nothing wrong happened.

@mickaelandrieu mickaelandrieu added the Bug label Jun 27, 2018

@marionf

This comment has been minimized.

Contributor

marionf commented Jun 27, 2018

@eternoendless How can we test it ?

@eternoendless

This comment has been minimized.

Member

eternoendless commented Jun 27, 2018

@marionf You need the mailchimp module. According to @Adrienaddons it happens when you try clearing your cache in the Performance page.

@marionf marionf added QA ✔️ and removed waiting for QA labels Jun 27, 2018

@PierreRambaud PierreRambaud merged commit 3dc233e into PrestaShop:1.7.4.x Jun 28, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment