Skip to content

Commit f7b20d7

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: feat: add warning for number constraints with PHP 7.x Document Symfony CLI `--no-workers` option Fix wrong URL for Twig Environment
2 parents 5618562 + 0b170c8 commit f7b20d7

11 files changed

+29
-1
lines changed

reference/constraints/GreaterThan.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThan`
1212
Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator`
1313
========== ===================================================================
1414

15+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
16+
1517
Basic Usage
1618
-----------
1719

reference/constraints/GreaterThanOrEqual.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqu
1111
Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator`
1212
========== ===================================================================
1313

14+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
15+
1416
Basic Usage
1517
-----------
1618

reference/constraints/LessThan.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\LessThan`
1212
Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanValidator`
1313
========== ===================================================================
1414

15+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
16+
1517
Basic Usage
1618
-----------
1719

reference/constraints/LessThanOrEqual.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqual`
1111
Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator`
1212
========== ===================================================================
1313

14+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
15+
1416
Basic Usage
1517
-----------
1618

reference/constraints/Negative.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\Negative`
1111
Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanValidator`
1212
========== ===================================================================
1313

14+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
15+
1416
Basic Usage
1517
-----------
1618

reference/constraints/NegativeOrZero.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\NegativeOrZero`
1010
Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator`
1111
========== ===================================================================
1212

13+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
14+
1315
Basic Usage
1416
-----------
1517

reference/constraints/Positive.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\Positive`
1111
Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanValidator`
1212
========== ===================================================================
1313

14+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
15+
1416
Basic Usage
1517
-----------
1618

reference/constraints/PositiveOrZero.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Class :class:`Symfony\\Component\\Validator\\Constraints\\PositiveOrZero`
1010
Validator :class:`Symfony\\Component\\Validator\\Constraints\\GreaterThanOrEqualValidator`
1111
========== ===================================================================
1212

13+
.. include:: /reference/constraints/_php7-string-and-number.rst.inc
14+
1315
Basic Usage
1416
-----------
1517

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. caution::
2+
3+
When using PHP 7.x, if the value is a string (e.g. ``1234asd``), the validator
4+
will not trigger an error. In this case, you must also use the
5+
:doc:`Type constraint </reference/constraints/Type>` with
6+
``numeric``, ``integer`, etc. to reject strings.

setup/symfony_server.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ There are several options that you can set using a ``.symfony.local.yaml`` confi
327327
no_tls: true # Use HTTP instead of HTTPS
328328
daemon: true # Run the server in the background
329329
use_gzip: true # Toggle GZIP compression
330+
no_workers: true # Do not start workers
330331
331332
.. caution::
332333

@@ -364,6 +365,11 @@ If you like some processes to start automatically, along with the webserver
364365
# auto start Docker compose when starting server (available since Symfony CLI 5.7.0)
365366
docker_compose: ~
366367
368+
.. tip::
369+
370+
You may want to not start workers on some environments like CI. You can use the
371+
``--no-workers`` option to start the server without starting workers.
372+
367373
.. _symfony-server-docker:
368374

369375
Docker Integration

templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ for this class and :doc:`tag your service </service_container/tags>` with ``twig
16601660
.. _`snake case`: https://en.wikipedia.org/wiki/Snake_case
16611661
.. _`tags`: https://twig.symfony.com/doc/3.x/tags/index.html
16621662
.. _`Twig block tag`: https://twig.symfony.com/doc/3.x/tags/block.html
1663-
.. _`Twig Environment`: https://github.com/twigphp/Twig/blob/3.x/src/Loader/FilesystemLoader.php
1663+
.. _`Twig Environment`: https://github.com/twigphp/Twig/blob/3.x/src/Environment.php
16641664
.. _`Twig Extensions`: https://twig.symfony.com/doc/3.x/advanced.html#creating-an-extension
16651665
.. _`Twig output escaping docs`: https://twig.symfony.com/doc/3.x/api.html#escaper-extension
16661666
.. _`Twig raw filter`: https://twig.symfony.com/doc/3.x/filters/raw.html

0 commit comments

Comments
 (0)