Skip to content

Commit 0decc21

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Fix typos in psr7.rst reword note about empty values during validation
2 parents 5822130 + 6577405 commit 0decc21

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

components/psr7.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ The bridge provides an interface of a factory called
3535
that builds objects implementing PSR-7 interfaces from HttpFoundation objects.
3636
It also provide a default implementation using Zend Diactoros internally.
3737

38-
The following code snippet explain how to convert a :class:`Symfony\\Component\\HttpFoundation\\Request`
39-
to a ``Zend\\Diactoros\\ServerRequest`` class implementing the
40-
``Psr\\Http\\Message\\ServerRequestInterface`` interface::
38+
The following code snippet explains how to convert a :class:`Symfony\\Component\\HttpFoundation\\Request`
39+
to a ``Zend\Diactoros\ServerRequest`` class implementing the
40+
``Psr\Http\Message\ServerRequestInterface`` interface::
4141

4242
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
4343
use Symfony\Component\HttpFoundation\Request;
@@ -49,8 +49,8 @@ to a ``Zend\\Diactoros\\ServerRequest`` class implementing the
4949
$psrRequest = $psr7Factory->createRequest($symfonyRequest);
5050

5151
And now from a :class:`Symfony\\Component\\HttpFoundation\\Response` to a
52-
``Zend\\Diactoros\\Response`` class implementing the
53-
``Psr\\Http\\Message\\ResponseInterface`` interface::
52+
``Zend\Diactoros\Response`` class implementing the
53+
``Psr\Http\Message\ResponseInterface`` interface::
5454

5555
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
5656
use Symfony\Component\HttpFoundation\Response;
@@ -68,7 +68,7 @@ On the other hand, the bridge provide a factory interface called
6868
that builds HttpFoundation objects from objects implementing PSR-7 interfaces.
6969

7070
The next snippet explain how to convert an object implementing the
71-
``Psr\\Http\\Message\\ServerRequestInterface`` interface to a
71+
``Psr\Http\Message\ServerRequestInterface`` interface to a
7272
:class:`Symfony\\Component\\HttpFoundation\\Request` instance::
7373

7474
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
@@ -78,7 +78,7 @@ The next snippet explain how to convert an object implementing the
7878
$httpFoundationFactory = new HttpFoundationFactory();
7979
$symfonyRequest = $httpFoundationFactory->createRequest($psrRequest);
8080

81-
From an object implementing the ``Psr\\Http\\Message\\ResponseInterface``
81+
From an object implementing the ``Psr\Http\Message\ResponseInterface``
8282
to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
8383

8484
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. note::
22

3-
As with most of the other constraints, ``null`` values and empty strings
4-
are considered valid values. Otherwise, in addition to validating this value,
5-
you would also be requiring it, making it impossible to be optional. That's
6-
why it's common to combine this constraint with
7-
:doc:`NotBlank </reference/constraints/NotBlank>`.
3+
As with most of the other constraints, ``null`` and empty strings are
4+
considered valid values. This is to allow them to be optional values.
5+
If the value is mandatory, a common solution is to combine this constraint
6+
with :doc:`NotBlank </reference/constraints/NotBlank>`.

0 commit comments

Comments
 (0)