Skip to content

Commit 1b4d7a6

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Cache] Removing null coalescing assignment operator on 5.4 [Cache] Fix storing binary keys when using pgsql [FrameworkBundle] Add missing monolog channel tag for messenger services [FrameworkBundle] Improve documentation about translation:extract --sort option [VarDumper] Disable links for IntelliJ platform [Notifier] Add bridge documentation [HttpClient] Add hint about `timeout` and `max_duration` options [HttpFoundation] Use separate caches for IpUtils checkIp4 and checkIp6 [FrameworkBundle] Fix wiring session.handler when handler_id is null [FrameworkBundle] Workflow - Fix LogicException about a wrong configuration of "enabled" node
2 parents 8fc6a78 + 1294218 commit 1b4d7a6

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

Command/TranslationUpdateCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function configure()
8787
new InputOption('force', null, InputOption::VALUE_NONE, 'Should the extract be done'),
8888
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
8989
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to extract'),
90-
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'),
90+
new InputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically (only works with --dump-messages)', 'asc'),
9191
new InputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'),
9292
])
9393
->setHelp(<<<'EOF'
@@ -116,7 +116,6 @@ protected function configure()
116116
You can dump a tree-like structure using the yaml format with <comment>--as-tree</> flag:
117117
118118
<info>php %command.full_name% --force --format=yaml --as-tree=3 en AcmeBundle</info>
119-
<info>php %command.full_name% --force --format=yaml --sort=asc --as-tree=3 fr</info>
120119

121120
EOF
122121
)

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
358358

359359
foreach ($workflows as $key => $workflow) {
360360
if (isset($workflow['enabled']) && false === $workflow['enabled']) {
361-
throw new LogicException(sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $workflow['name']));
361+
throw new LogicException(sprintf('Cannot disable a single workflow. Remove the configuration for the workflow "%s" instead.', $key));
362362
}
363363

364364
unset($workflows[$key]['enabled']);

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,11 +1180,8 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
11801180

11811181
// session handler (the internal callback registered with PHP session management)
11821182
if (null === $config['handler_id']) {
1183-
// Set the handler class to be null
1184-
$container->getDefinition('session.storage.factory.native')->replaceArgument(1, null);
1185-
$container->getDefinition('session.storage.factory.php_bridge')->replaceArgument(0, null);
1186-
1187-
$container->setAlias('session.handler', 'session.handler.native_file');
1183+
$config['save_path'] = null;
1184+
$container->setAlias('session.handler', 'session.handler.native');
11881185
} else {
11891186
$container->resolveEnvPlaceholders($config['handler_id'], null, $usedEnvs);
11901187

Resources/config/messenger.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
->args([
142142
service('logger')->ignoreOnInvalid(),
143143
])
144+
->tag('monolog.logger', ['channel' => 'messenger'])
144145

145146
->set('messenger.transport.beanstalkd.factory', BeanstalkdTransportFactory::class)
146147

@@ -203,6 +204,7 @@
203204
service('logger')->ignoreOnInvalid(),
204205
])
205206
->tag('kernel.event_subscriber')
207+
->tag('monolog.logger', ['channel' => 'messenger'])
206208

207209
->set('messenger.listener.stop_worker_on_stop_exception_listener', StopWorkerOnCustomStopExceptionListener::class)
208210
->tag('kernel.event_subscriber')

Resources/config/session.php

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

7070
->alias(\SessionHandlerInterface::class, 'session.handler')
7171

72+
->set('session.handler.native', StrictSessionHandler::class)
73+
->args([
74+
inline_service(\SessionHandler::class),
75+
])
76+
7277
->set('session.handler.native_file', StrictSessionHandler::class)
7378
->args([
7479
inline_service(NativeFileSessionHandler::class)

Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,8 @@ public function testNullSessionHandler()
660660
{
661661
$container = $this->createContainerFromFile('session');
662662

663-
$this->assertNull($container->getDefinition('session.storage.factory.native')->getArgument(1));
664-
$this->assertNull($container->getDefinition('session.storage.factory.php_bridge')->getArgument(0));
665-
$this->assertSame('session.handler.native_file', (string) $container->getAlias('session.handler'));
663+
$this->assertNull($container->getParameter('session.save_path'));
664+
$this->assertSame('session.handler.native', (string) $container->getAlias('session.handler'));
666665

667666
$expected = ['session_factory', 'logger', 'session_collector'];
668667
$this->assertEquals($expected, array_keys($container->getDefinition('session_listener')->getArgument(0)->getValues()));

0 commit comments

Comments
 (0)