Skip to content

Commit 2a5a43c

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Fixes windows error [Messenger] Added more test for MessageBus fixed typo [Filesystem] added missing deprecations to UPGRADE-4.3.md Fix authentication for redis transport only decorate when an event dispatcher was passed [FrmaeworkBundle] More simplifications in the DI configuration Fixing validation for messenger transports retry_strategy service key Removed unused field. Remove @internal annotations for the serilize methods [Lock] Stores must implement `putOffExpiration` Annotated correct return type for getInEdges()/getOutEdges(). deprecate the framework.templating option
2 parents 025bd70 + 206ddd7 commit 2a5a43c

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CHANGELOG
1212
4.3.0
1313
-----
1414

15+
* Deprecated the `framework.templating` option, use Twig instead.
1516
* Added `WebTestAssertionsTrait` (included by default in `WebTestCase`)
1617
* Renamed `Client` to `KernelBrowser`
1718
* Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will

DependencyInjection/Configuration.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
339339
->defaultNull()
340340
->end()
341341
->arrayNode('initial_marking')
342-
->beforeNormalization()
343-
->ifTrue(function ($v) { return !\is_array($v); })
344-
->then(function ($v) { return [$v]; })
345-
->end()
342+
->beforeNormalization()->castToArray()->end()
346343
->defaultValue([])
347344
->prototype('scalar')->end()
348345
->end()
@@ -602,6 +599,7 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
602599
->arrayNode('templating')
603600
->info('templating configuration')
604601
->canBeEnabled()
602+
->setDeprecated('The "%path%.%node%" configuration is deprecated since Symfony 4.3. Use the "twig" service directly instead.')
605603
->beforeNormalization()
606604
->ifTrue(function ($v) { return false === $v || \is_array($v) && false === $v['enabled']; })
607605
->then(function () { return ['enabled' => false, 'engines' => false]; })
@@ -1180,9 +1178,14 @@ function ($a) {
11801178
->end()
11811179
->arrayNode('retry_strategy')
11821180
->addDefaultsIfNotSet()
1183-
->validate()
1184-
->ifTrue(function ($v) { return null !== $v['service'] && (isset($v['max_retries']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay'])); })
1185-
->thenInvalid('"service" cannot be used along with the other retry_strategy options.')
1181+
->beforeNormalization()
1182+
->always(function ($v) {
1183+
if (isset($v['service']) && (isset($v['max_retries']) || isset($v['delay']) || isset($v['multiplier']) || isset($v['max_delay']))) {
1184+
throw new \InvalidArgumentException('The "service" cannot be used along with the other "retry_strategy" options.');
1185+
}
1186+
1187+
return $v;
1188+
})
11861189
->end()
11871190
->children()
11881191
->scalarNode('service')->defaultNull()->info('Service id to override the retry strategy entirely')->end()

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public function testDefaultConfig()
3535
);
3636
}
3737

38+
/**
39+
* @group legacy
40+
*/
3841
public function testDoNoDuplicateDefaultFormResources()
3942
{
4043
$input = ['templating' => [

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,9 @@ public function testTemplating()
602602
$this->assertEquals('global_hinclude_template', $container->getParameter('fragment.renderer.hinclude.global_template'), '->registerTemplatingConfiguration() registers the global hinclude.js template');
603603
}
604604

605+
/**
606+
* @group legacy
607+
*/
605608
public function testTemplatingCanBeDisabled()
606609
{
607610
$container = $this->createContainerFromFile('templating_disabled');
@@ -872,6 +875,7 @@ public function testTranslatorMultipleFallbacks()
872875
}
873876

874877
/**
878+
* @group legacy
875879
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
876880
*/
877881
public function testTemplatingRequiresAtLeastOneEngine()

0 commit comments

Comments
 (0)