8000 Minor tweaks · symfony/symfony-docs@d810f6c · GitHub
[go: up one dir, main page]

Skip to content

Commit d810f6c

Browse files
committed
Minor tweaks
1 parent 2afb834 commit d810f6c

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

configuration.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -385,22 +385,17 @@ a new ``locale`` parameter is added to the ``config/services.yaml`` file).
385385
Configuration parameters are usually validation- 8000 free, but you can ensure that
386386
essential parameters for your application's functionality are not empty::
387387

388-
// ContainerBuilder
389-
$container->parameterCannotBeEmpty('app.private_key', 'Did you forget to configure a non-empty value for "app.private_key" parameter?');
388+
/** @var ContainerBuilder $container */
389+
$container->parameterCannotBeEmpty('app.private_key', 'Did you forget to set a value for the "app.private_key" parameter?');
390390

391391
If a non-empty parameter is ``null``, an empty string ``''``, or an empty array ``[]``,
392-
Symfony will throw an exception with the custom error message when attempting to
393-
retrieve the value of this parameter.
392+
Symfony will throw an exception. This validation is **not** made at compile time
393+
but when attempting to retrieve the value of the parameter.
394394

395395
.. versionadded:: 7.2
396396

397397
Validating non-empty parameters was introduced in Symfony 7.2.
398398

399-
.. note::
400-
6113
401-
Please note that this validation will *only* occur if a non-empty parameter value
402-
is retrieved; otherwise, no exception will be thrown.
403-
404399
.. seealso::
405400

406401
Later in this article you can read how to

0 commit comments

Comments
 (0)
0