Skip to content

Commit b79a1bf

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 10449cb + 98c3602 commit b79a1bf

File tree

17 files changed

+88
-27
lines changed

17 files changed

+88
-27
lines changed

UPGRADE-4.3.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ EventDispatcher
5757
* The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated
5858
* The `Event` class has been deprecated, use `Symfony\Contracts\EventDispatcher\Event` instead
5959

60+
Filesystem
61+
----------
62+
63+
* Support for passing arrays to `Filesystem::dumpFile()` is deprecated.
64+
* Support for passing arrays to `Filesystem::appendToFile()` is deprecated.
65+
6066
Form
6167
----
6268

@@ -71,6 +77,7 @@ Form
7177
FrameworkBundle
7278
---------------
7379

80+
* Deprecated the `framework.templating` option, use Twig instead.
7481
* Not passing the project directory to the constructor of the `AssetsInstallCommand` is deprecated. This argument will
7582
be mandatory in 5.0.
7683
* Deprecated the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead.

UPGRADE-5.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ Form
207207
FrameworkBundle
208208
---------------
209209

210+
* Removed the `framework.templating` option, use Twig instead.
210211
* The project dir argument of the constructor of `AssetsInstallCommand` is required.
211-
212212
* Removed support for `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method`
213213
instead where `serviceOrFqcn` is either the service ID when using controllers as services or the FQCN of the controller.
214214

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
132132
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
133133
// --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS
134-
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
134+
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p));
135135
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
136136
if ($exit) {
137137
exit($exit);

src/Symfony/Bundle/FrameworkBundle/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

src/Symfony/Bundle/FrameworkBundle/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()

src/Symfony/Bundle/FrameworkBundle/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' => [

src/Symfony/Bundle/FrameworkBundle/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()

src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe
3434
private $onlyConstructorArguments;
3535
private $hasProxyDumper;
3636
private $lazy;
37-
private $expressionLanguage;
3837
private $byConstructor;
3938
private $definitions;
4039
private $aliases;

src/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraphNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getId()
8181
/**
8282
* Returns the in edges.
8383
*
84-
* @return array The in ServiceReferenceGraphEdge array
84+
* @return ServiceReferenceGraphEdge[]
8585
*/
8686
public function getInEdges()
8787
{
@@ -91,7 +91,7 @@ public function getInEdges()
9191
/**
9292
* Returns the out edges.
9393
*
94-
* @return array The out ServiceReferenceGraphEdge array
94+
* @return ServiceReferenceGraphEdge[]
9595
*/
9696
public function getOutEdges()
9797
{

src/Symfony/Component/Lock/Store/ZookeeperStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function waitAndSave(Key $key)
9595
*/
9696
public function putOffExpiration(Key $key, $ttl)
9797
{
98-
throw new NotSupportedException();
98+
// do nothing, zookeeper locks forever.
9999
}
100100

101101
/**

0 commit comments

Comments
 (0)