Skip to content

Commit 9a64a69

Browse files
Merge branch '4.3' into 4.4
* 4.3: [OptionsResolve] Revert change in tests for a not-merged change in code [HttpClient] fix handling of 3xx with no Location header - ignore Content-Length when no body is expected [Workflow] Made the configuration more robust for the 'property' key [Security/Core] make NativePasswordEncoder use sodium to validate passwords when possible #30432 fix an error message fix paths to detect code owners [HttpClient] ignore the body of responses to HEAD requests [Validator] Ensure numeric subpaths do not cause errors on PHP 7.4 [SecurityBundle] Fix wrong assertion Remove unused local variables in tests [Yaml][Parser] Remove the getLastLineNumberBeforeDeprecation() internal unused method Make sure to collect child forms created on *_SET_DATA events [WebProfilerBundle] Improve display in Email panel for dark theme do not render errors for checkboxes twice
2 parents d1f91f5 + 4d32d14 commit 9a64a69

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

Console/Descriptor/TextDescriptor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ private function renderEventListenerTable(EventDispatcherInterface $eventDispatc
510510
$tableHeaders = ['Order', 'Callable', 'Priority'];
511511
$tableRows = [];
512512

513-
$order = 1;
514513
foreach ($eventListeners as $order => $listener) {
515514
$tableRows[] = [sprintf('#%d', $order + 1), $this->formatCallable($listener), $eventDispatcher->getListenerPriority($event, $listener)];
516515
}

DependencyInjection/Configuration.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
322322
->end()
323323
->end()
324324
->scalarNode('property')
325-
->defaultValue('marking')
325+
->defaultNull() // In Symfony 5.0, set "marking" as default property
326326
->end()
327327
->scalarNode('service')
328328
->cannotBeEmpty()
@@ -500,6 +500,14 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
500500
return $v;
501501
})
502502
->end()
503+
->validate()
504+
->ifTrue(function ($v) {
505+
return isset($v['marking_store']['property'])
506+
&& (!isset($v['marking_store']['type']) || 'method' !== $v['marking_store']['type'])
507+
;
508+
})
509+
->thenInvalid('"property" option is only supported by the "method" marking store.')
510+
->end()
503511
->end()
504512
->end()
505513
->end()

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
697697
if ('method' === $workflow['marking_store']['type']) {
698698
$markingStoreDefinition->setArguments([
699699
'state_machine' === $type, //single state
700-
$workflow['marking_store']['property'],
700+
$workflow['marking_store']['property'] ?? 'marking',
701701
]);
702702
} else {
703703
foreach ($workflow['marking_store']['arguments'] as $argument) {

Tests/Controller/ControllerTraitTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ public function testFileWhichDoesNotExist()
272272
$this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException');
273273
$controller = $this->createController();
274274

275-
/* @var BinaryFileResponse $response */
276-
$response = $controller->file('some-file.txt', 'test.php');
275+
$controller->file('some-file.txt', 'test.php');
277276
}
278277

279278
public function testIsGranted()

Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TestExtension extends Extension implements PrependExtensionInterface
2727
public function load(array $configs, ContainerBuilder $container)
2828
{
2929
$configuration = $this->getConfiguration($configs, $container);
30-
$config = $this->processConfiguration($configuration, $configs);
30+
$this->processConfiguration($configuration, $configs);
3131

3232
$container->setAlias('test.annotation_reader', new Alias('annotation_reader', true));
3333
}

Tests/Functional/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testFlash($config, $insulate)
5959
}
6060

6161
// set flash
62-
$crawler = $client->request('GET', '/session_setflash/Hello%20world.');
62+
$client->request('GET', '/session_setflash/Hello%20world.');
6363

6464
// check flash displays on redirect
6565
$this->assertStringContainsString('Hello world.', $client->followRedirect()->text());

0 commit comments

Comments
 (0)