Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  [Cache] fix catching auth errors
  Fix CS
  [FrameworkBundle] set default session.handler alias if handler_id is not provided
  Fix CS
  Readability update
  Fix checks for phpunit releases on Composer 2 (resolves #37601)
  [SCA] Minor fixes on tests
  • Loading branch information
nicolas-grekas committed Jul 23, 2020
2 parents a40da4f + 7c8345e commit c698b86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions DependencyInjection/FrameworkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
// Set the handler class to be null
$container->getDefinition('session.storage.native')->replaceArgument(1, null);
$container->getDefinition('session.storage.php_bridge')->replaceArgument(0, null);
$container->setAlias('session.handler', 'session.handler.native_file')->setPrivate(true);
} else {
$container->resolveEnvPlaceholders($config['handler_id'], null, $usedEnvs);

Expand Down
1 change: 1 addition & 0 deletions Tests/DependencyInjection/FrameworkExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ public function testNullSessionHandler()
$this->assertTrue($container->hasDefinition('session'), '->registerSessionConfiguration() loads session.xml');
$this->assertNull($container->getDefinition('session.storage.native')->getArgument(1));
$this->assertNull($container->getDefinition('session.storage.php_bridge')->getArgument(0));
$this->assertSame('session.handler.native_file', (string) $container->getAlias('session.handler'));

$expected = ['session', 'initialized_session'];
$this->assertEquals($expected, array_keys($container->getDefinition('session_listener')->getArgument(0)->getValues()));
Expand Down

0 comments on commit c698b86

Please sign in to comment.