Skip to content

Commit cf87f6f

Browse files
committed
minor #19656 [FrameworkBundle][Debug] Fix default config and cleaning 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
2 parents 9dca27d + fbd87d4 commit cf87f6f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ private function addPhpErrorsSection(ArrayNodeDefinition $rootNode)
704704
->children()
705705
->booleanNode('log')
706706
->info('Use the app logger instead of the PHP logger for logging PHP errors.')
707-
->defaultValue(false)
708-
->treatNullLike(false)
707+
->defaultValue($this->debug)
708+
->treatNullLike($this->debug)
709709
->end()
710710
->booleanNode('throw')
711711
->info('Throw PHP errors as \ErrorException instances.')

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ protected static function getBundleDefaultConfig()
275275
),
276276
'workflows' => array(),
277277
'php_errors' => array(
278-
'log' => false,
278+
'log' => true,
279279
'throw' => true,
280280
),
281281
);

0 commit comments

Comments
 (0)