Skip to content

Commit b095681

Browse files
Merge branch '4.4' into 5.0
* 4.4: Fixed #35084 Add missing use statement [HttpClient] fix scheduling pending NativeResponse do not overwrite variable value [Profiler] wording Use spaces correctly to display options in DebugCommand X-Accel Nginx URL updated ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale Fixed test added in #35022 Use locale_parse for computing fallback locales [Console] Fix filtering out identical alternatives when there is a command loader add note about HTTP status code change Migrate server:log command away from WebServerBundle [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable [Security] Fix missing defaults for auto-migrating encoders bumped Symfony version to 4.4.3 updated VERSION for 4.4.2 updated CHANGELOG for 4.4.2
2 parents c9ea0bd + 2e20337 commit b095681

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

DebugBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\DebugBundle;
1313

1414
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass;
15+
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\RemoveWebServerBundleLoggerPass;
1516
use Symfony\Component\Console\Application;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
1718
use Symfony\Component\HttpKernel\Bundle\Bundle;
@@ -52,6 +53,7 @@ public function build(ContainerBuilder $container)
5253
parent::build($container);
5354

5455
$container->addCompilerPass(new DumpDataCollectorPass());
56+
$container->addCompilerPass(new RemoveWebServerBundleLoggerPass());
5557
}
5658

5759
public function registerCommands(Application $application)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bundle\DebugBundle\DependencyInjection\Compiler;
13+
14+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15+
use Symfony\Component\DependencyInjection\ContainerBuilder;
16+
17+
/**
18+
* @author Jérémy Derussé <[email protected]>
19+
*/
20+
class RemoveWebServerBundleLoggerPass implements CompilerPassInterface
21+
{
22+
/**
23+
* {@inheritdoc}
24+
*/
25+
public function process(ContainerBuilder $container)
26+
{
27+
if ($container->hasDefinition('web_server.command.server_log') && $container->hasDefinition('monolog.command.server_log')) {
28+
$container->removeDefinition('web_server.command.server_log');
29+
}
30+
}
31+
}

DependencyInjection/DebugExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\DebugBundle\DependencyInjection;
1313

14+
use Symfony\Bridge\Monolog\Command\ServerLogCommand;
1415
use Symfony\Bundle\DebugBundle\Command\ServerDumpPlaceholderCommand;
1516
use Symfony\Component\Config\FileLocator;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -90,6 +91,10 @@ public function load(array $configs, ContainerBuilder $container)
9091
]])
9192
;
9293
}
94+
95+
if (!class_exists(ServerLogCommand::class)) {
96+
$container->removeDefinition('monolog.command.server_log');
97+
}
9398
}
9499

95100
/**

Resources/config/services.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,9 @@
107107
</argument>
108108
<tag name="console.command" command="server:dump" />
109109
</service>
110+
111+
<service id="monolog.command.server_log" class="Symfony\Bridge\Monolog\Command\ServerLogCommand">
112+
<tag name="console.command" command="server:log" />
113+
</service>
110114
</services>
111115
</container>

0 commit comments

Comments
 (0)