Skip to content

Commit 8e09b5a

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [EventDispatcher] Fix typo in reference events Tweak validator configuration for attributes/annotations [Testing] Add link request method & add type hint
2 parents 0e1f91a + 8e0cf4f commit 8e09b5a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

components/validator/resources.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ prefixed classes included in doc block comments (``/** ... */``). For example::
106106
}
107107

108108
To enable the annotation loader, call the
109-
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::enableAnnotationMapping` method
110-
and then call ``addDefaultDoctrineAnnotationReader()`` to use Doctrine's
111-
annotation reader::
109+
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::enableAnnotationMapping` method.
110+
If you use annotations instead of attributes, it's also required to call
111+
``addDefaultDoctrineAnnotationReader()`` to use Doctrine's annotation reader::
112112

113113
use Symfony\Component\Validator\Validation;
114114

115115
$validator = Validation::createValidatorBuilder()
116-
->enableAnnotationMapping(true)
117-
->addDefaultDoctrineAnnotationReader()
116+
->enableAnnotationMapping()
117+
->addDefaultDoctrineAnnotationReader() // add this only when using annotations
118118
->getValidator();
119119

120120
To disable the annotation loader after it was enabled, call

reference/events.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ their priorities:
5454

5555
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\ControllerEvent`
5656

57-
This event is dispatched after the controller to be executed has been resolved
58-
but before executing it. It's useful to initialize things later needed by the
57+
This event is dispatched after the controller has been resolved but before executing
58+
it. It's useful to initialize things later needed by the
5959
controller, such as `param converters`_, and even to change the controller
6060
entirely::
6161

testing.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ into your Symfony application::
501501

502502
$crawler = $client->request('GET', '/post/hello-world');
503503

504-
The ``request()`` method takes the HTTP method and a URL as arguments and
504+
The :method:`request() <Symfony\\Component\\BrowserKit\\AbstractBrowser::request>` method takes the HTTP method and a URL as arguments and
505505
returns a ``Crawler`` instance.
506506

507507
.. tip::
@@ -513,14 +513,14 @@ returns a ``Crawler`` instance.
513513
The full signature of the ``request()`` method is::
514514

515515
request(
516-
$method,
517-
$uri,
516+
string $method,
517+
string $uri,
518518
array $parameters = [],
519519
array $files = [],
520520
array $server = [],
521-
$content = null,
522-
$changeHistory = true
523-
)
521+
string $content = null,
522+
bool $changeHistory = true
523+
): Crawler
524524

525525
This allows you to create all types of requests you can think of:
526526

0 commit comments

Comments
 (0)