Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 382b586

Browse filesBrowse files
committed
bug #26740 [FrameworkBundle] fix log level support config handling (xabbuh)
This PR was squashed before being merged into the 4.1-dev branch (closes #26740). Discussion ---------- [FrameworkBundle] fix log level support config handling | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 2ee6bb4 fix log level support config handling ad8c8d0 add PHP errors options to XML schema definition
2 parents 9504915 + 2ee6bb4 commit 382b586
Copy full SHA for 382b586

File tree

Expand file treeCollapse file tree

6 files changed

+30
-2
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+30
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con
656656
}
657657

658658
if (\is_int($config['log']) && $config['log']) {
659-
$definition->replaceArgument(4, $config['log']);
659+
$definition->replaceArgument(3, $config['log']);
660660
}
661661

662662
if (!$config['throw']) {

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
</xsd:complexType>
288288

289289
<xsd:complexType name="php-errors">
290-
<xsd:attribute name="log" type="xsd:boolean" />
290+
<xsd:attribute name="log" type="xsd:string" />
291291
<xsd:attribute name="throw" type="xsd:boolean" />
292292
</xsd:complexType>
293293

+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
$container->loadFromExtension('framework', array(
4+
'php_errors' => array(
5+
'log' => 8,
6+
),
7+
));
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" ?>
2+
<container xmlns="http://symfony.com/schema/dic/services"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:framework="http://symfony.com/schema/dic/symfony"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
6+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
7+
8+
<framework:config>
9+
<framework:php-errors log="8" />
10+
</framework:config>
11+
</container>
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
framework:
2+
php_errors:
3+
log: 8

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,13 @@ public function testDisabledPhpErrorsConfig()
352352
$this->assertSame(0, $container->getParameter('debug.error_handler.throw_at'));
353353
}
354354

355+
public function testPhpErrorsWithLogLevel()
356+
{
357+
$container = $this->createContainerFromFile('php_errors_log_level');
358+
359+
$this->assertEquals(8, $container->getDefinition('debug.debug_handlers_listener')->getArgument(3));
360+
}
361+
355362
public function testRouter()
356363
{
357364
$container = $this->createContainerFromFile('full');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.