[FrameworkBundle] framework.php_errors.log now accept a log level
This commit is contained in:
parent
d65c43ba84
commit
664f821895
@ -833,10 +833,14 @@ class Configuration implements ConfigurationInterface
|
||||
->info('PHP errors handling configuration')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->booleanNode('log')
|
||||
->scalarNode('log')
|
||||
->info('Use the app logger instead of the PHP logger for logging PHP errors.')
|
||||
->defaultValue($this->debug)
|
||||
->treatNullLike($this->debug)
|
||||
->validate()
|
||||
->ifTrue(function ($v) { return !(\is_int($v) || \is_bool($v)); })
|
||||
->thenInvalid('The "php_errors.log" parameter should be either an integer or a boolean.')
|
||||
->end()
|
||||
->end()
|
||||
->booleanNode('throw')
|
||||
->info('Throw PHP errors as \ErrorException instances.')
|
||||
|
@ -605,6 +605,10 @@ class FrameworkExtension extends Extension
|
||||
$definition->replaceArgument(1, null);
|
||||
}
|
||||
|
||||
if (\is_int($config['log']) && $config['log']) {
|
||||
$definition->replaceArgument(4, $config['log']);
|
||||
}
|
||||
|
||||
if (!$config['throw']) {
|
||||
$container->setParameter('debug.error_handler.throw_at', 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user