Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Remove special care for E_USER_DEPRECATED #906

Merged
merged 1 commit into from
Dec 15, 2015
Merged

Conversation

nicolas-grekas
Copy link
Member

We don't need this anymore

@xabbuh
Copy link
Member

xabbuh commented Dec 10, 2015

👍

1 similar comment
@stof
Copy link
Member

stof commented Dec 10, 2015

👍

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

IMO its still better to keep it as some libraries do not use silencing with @tigger_error like Elastica.

@nicolas-grekas
Copy link
Member Author

We added this in 2.8, elastica runs on 2.7, thus it already works without silencing

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

The problem is E_USER_DEPRECATED is not excluded by default and thus if you don't use Symfony Debug ErrorHandler, user deprecations are taken action on, e.g. in production mode.
This might be not wanted (since E_DEPRECATED and E_STRICT is excluded by default).

@nicolas-grekas
Copy link
Member Author

Nobody reported any issue with 2.7, thus I'd say this is theoretical.
But if we keep this on the long run, people will ignore things that they cant ignore right now.

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

But if we keep this on the long run, people will ignore things that they cant ignore right now.

I don't understand.

Btw, how would it be possible currently to log symfonys deprecations in production mode? I guess one has to use the Debug ErrorHandler somehow in production mode?
It's unfortunate that the silencing makes it impossible to use php internal log_errors directive, doesn't it?

@nicolas-grekas
Copy link
Member Author

2.8.0 is the only released version where deprecations are silenced, this is new behavior, but bad imho.
Apps running on non-2.8.0 already fixed/handled deprecations, since they have no choice but deal with them (when unsilenced)
Making it impossible to log deprecations in prod with the internal error handler is not an issue at all for me (and not related to this PR btw).

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

I don't see why you think this is new behavior. You added this silencing in sensiolabs/SensioDistributionBundle#201 and thus is it part even of the newer 2.3 releases of symfony-standard. This is not new to 2.8.0 at all. I just extracted it from bootstrap to autoload.

I'm ok to remove that again. I'm just pointing out there will be a different behavior for deprecations triggered via @trigger_error and trigger_error in production mode.

@stof
Copy link
Member

stof commented Dec 10, 2015

@Tobion non-silenced deprecations would then go to error_log in prod, which will not break your app

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Dec 10, 2015 via email

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

@stof unless people use an error handler in prod that transforms deprecations to exceptions. This to my knowledge exactly the reason why we silenced deprecations in the first place. As workaround for all those error handlers that treated deprecations like any other error.

In the hope that those error handlers are fixed by now, I'm 👍 to merge this.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Dec 10, 2015 via email

@Tobion
Copy link
Contributor

Tobion commented Dec 10, 2015

This can only be merged in 2.8. The 2.3 I was referring to was about the sensio distrubution bundle bootstrap generation (which is used in 2.3). Nicolas, you need to take a break :) You are getting confused.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Dec 10, 2015 via email

@Tobion
Copy link
Contributor

Tobion commented Dec 15, 2015

Thank you @nicolas-grekas.

@Tobion Tobion merged commit e9a1fce into symfony:2.8 Dec 15, 2015
Tobion added a commit that referenced this pull request Dec 15, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

Remove special care for E_USER_DEPRECATED

We don't need this anymore

Commits
-------

e9a1fce Remove special care for E_USER_DEPRECATED
@nicolas-grekas nicolas-grekas deleted the clean branch November 21, 2016 09:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants