Skip to content

[FrameworkBundle][Debug] Fix default config and cleaning of traces #19656

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

Merged
merged 1 commit into from
Aug 22, 2016

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 18, 2016

Q A
Branch? master
Bug fix? yes
Tests pass? yes
Fixed tickets Follow up #19568
License MIT
Doc PR -

The default value of framework.php_errors.log must be %kernel.debug% to have deprecations and silenced errors logged in dev as before.

Cleaning the trace was broken because a closure can't be bound to an internal class.

This PR fixes both issues and enhance trace cleaning a bit by removing arguments from traces so that they take less memory when collected as part of the context of log messages.

@lyrixx
Copy link
Member

lyrixx commented Aug 18, 2016

👍

->defaultValue(false)
->treatNullLike(false)
->defaultValue($this->debug)
->treatNullLike($this->debug)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That still does not make sense for me :) Looks like you are not fixing the root cause here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This config is just how things work since 2.7 at least (and before I guess): in debug mode, we log deprecations and silenced errors to show them in the profiler. In prod (aka !debug), the current strategy is to let the native PHP error handler to deal with any error. This was hidden hard coded in the DI extension and is now exposed to users. There is no change here from what's done since years...

@wouterj
Copy link
Member

wouterj commented Aug 22, 2016

Big 👍, this is currently a BC break.

@fabpot
Copy link
Member

fabpot commented Aug 22, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit f640870 into symfony:master Aug 22, 2016
fabpot added a commit that referenced this pull request Aug 22, 2016
… of traces (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle][Debug] Fix default config and cleaning of traces

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| Tests pass?   | yes
| Fixed tickets | Follow up #19568
| License       | MIT
| Doc PR        | -

The default value of `framework.php_errors.log` must be `%kernel.debug%` to have deprecations and silenced errors logged in dev as before.

Cleaning the trace was broken because a closure can't be bound to an internal class.

This PR fixes both issues and enhance trace cleaning a bit by removing arguments from traces so that they take less memory when collected as part of the context of log messages.

Commits
-------

f640870 [FrameworkBundle][Debug] Fix default config and cleaning of traces
@nicolas-grekas nicolas-grekas deleted the fix-debug branch August 22, 2016 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants