8000 Merge branch '5.4' into 6.2 · symfony/symfony-docs@8acc27e · GitHub
[go: up one dir, main page]

Skip to content

Commit 8acc27e

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: [Config] Introducing the new `param()` function as early as possible [Lock] Add Redis Secure DSN example
2 parents a6dc72e + 1a02013 commit 8acc27e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

configuration.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ configuration file using a special syntax: wrap the parameter name in two ``%``
296296
# any string surrounded by two % is replaced by that parameter value
297297
email_address: '%app.admin_email%'
298298
299-
# ...
300-
301299
.. code-block:: xml
302300
303301
<!-- config/packages/some_package.xml -->
@@ -320,13 +318,17 @@ configuration file using a special syntax: wrap the parameter name in two ``%``
320318
321319
// config/packages/some_package.php
322320
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
321+
use function Symfony\Component\DependencyInjection\Loader\Configurator\param;
323322
324323
return static function (ContainerConfigurator $container): void {
325324
$container->extension('some_package', [
326-
// any string surrounded by two % is replaced by that parameter value
327-
'email_address' => '%app.admin_email%',
325+
// when using the param() function, you only have to pass the parameter name...
326+
'email_address' => param('app.admin_email'),
328327
329-
// ...
328+
// ... but if you prefer it, you can also pass the name as a string
329+
// surrounded by two % (same as in YAML and XML formats) and Symfony will
330+
// replace it by that parameter value
331+
'email_address' => '%app.admin_email%',
330332
]);
331333
};
332334

lock.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ this behavior by using the ``lock`` key like:
5050
lock: ['memcached://m1.docker', 'memcached://m2.docker']
5151
lock: 'redis://r1.docker'
5252
lock: ['redis://r1.docker', 'redis://r2.docker']
53+
lock: 'rediss://r1.docker?ssl[verify_peer]=1&ssl[cafile]=...'
5354
lock: 'zookeeper://z1.docker'
5455
lock: 'zookeeper://z1.docker,z2.docker'
5556
lock: 'zookeeper://localhost01,localhost02:2181'

0 commit comments

Comments
 (0)
0