Skip to content

Commit 2c9eb89

Browse files
committed
Merge branch '4.0'
* 4.0: Fix missing trailling commas [Serializer] Added missing ObjectNormalizer [Serializer] By default the serializer do not convert to lower case properties Added a note about named form types Update translation.rst minor #8310 [DI] add docs for new namespace option (kbond, javiereguiluz) Added a note about controller arguments Documented the new behavior of getGroupSequence() method Fix UrlMatcher::match() URL Updated a diagram to SVG format Added a missing namespace in CacheKernel example fix creating a CacheKernel in HTTP cache documentation
2 parents 0665ada + aee4f13 commit 2c9eb89

34 files changed

+130
-67
lines changed
-62.8 KB
Binary file not shown.

_images/security/authentication-guard-methods.svg

Lines changed: 1 addition & 0 deletions
Loading
Binary file not shown.

components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ Pass an array of values::
462462
// sets multiple fields at once
463463
$form->setValues(array('multi' => array(
464464
1 => 'value',
465-
'dimensional' => 'an other value'
465+
'dimensional' => 'an other value',
466466
)));
467467

468468
This is great, but it gets better! The ``Form`` object allows you to interact

components/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ URL path and some array of custom variables in its constructor. This array
6262
of custom variables can be *anything* that's significant to your application,
6363
and is returned when that route is matched.
6464

65-
The :method:`UrlMatcher::match() <Symfony\\Component\\Routing\\UrlMatcher::match>`
65+
The :method:`UrlMatcher::match() <Symfony\\Component\\Routing\\Matcher\\UrlMatcher::match>`
6666
returns the variables you set on the route as well as the wildcard placeholders
6767
(see below). Your application can now use this information to continue
6868
processing the request. In addition to the configured variables, a ``_route``

components/serializer.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,10 @@ There are several types of normalizers available:
550550
directly and through getters, setters, hassers, adders and removers. It supports
551551
calling the constructor during the denormalization process.
552552

553-
Objects are normalized to a map of property names (method name stripped of
554-
the "get"/"set"/"has"/"remove" prefix and converted to lower case) to property
555-
values.
553+
Objects are normalized to a map of property names and values (names are
554+
generated removing the ``get``, ``set``, ``has`` or ``remove`` prefix from
555+
the method name and lowercasing the first letter; e.g. ``getFirstName()`` ->
556+
``firstName``).
556557

557558
The ``ObjectNormalizer`` is the most powerful normalizer. It is configured by
558559
default when using the Symfony Standard Edition with the serializer enabled.
@@ -562,8 +563,9 @@ There are several types of normalizers available:
562563
(public methods starting with "get"). It will denormalize data by calling
563564
the constructor and the "setters" (public methods starting with "set").
564565

565-
Objects are normalized to a map of property names (method name stripped of
566-
the "get" prefix and converted to lower case) to property values.
566+
Objects are normalized to a map of property names and values (names are
567+
generated removing the ``get`` prefix from the method name and lowercasing
568+
the first letter; e.g. ``getFirstName()`` -> ``firstName``).
567569

568570
:class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`
569571
This normalizer directly reads and writes public properties as well as
@@ -681,7 +683,8 @@ Circular references are common when dealing with entity relations::
681683
}
682684

683685
To avoid infinite loops, :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
684-
throws a :class:`Symfony\\Component\\Serializer\\Exception\\CircularReferenceException`
686+
or :class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer`
687+
throw a :class:`Symfony\\Component\\Serializer\\Exception\\CircularReferenceException`
685688
when such a case is encountered::
686689

687690
$member = new Member();

components/translation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ The constructor of the ``Translator`` class needs one argument: The locale.
3434
.. code-block:: php
3535
3636
use Symfony\Component\Translation\Translator;
37-
use Symfony\Component\Translation\MessageSelector;
3837
39-
$translator = new Translator('fr_FR', new MessageSelector());
38+
$translator = new Translator('fr_FR');
4039
4140
.. note::
4241

console/style.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ of your commands to change their appearance::
369369

370370
// After
371371
$io = new CustomStyle($input, $output);
372-
373372
// ...
374373
}
375374
}

doctrine/event_listeners_subscribers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ managers that use this connection.
7878
$container->autowire(SearchIndexer2::class)
7979
->addTag('doctrine.event_listener', array(
8080
'event' => 'postPersist',
81-
'connection' => 'default'
81+
'connection' => 'default',
8282
))
8383
;
8484
$container->autowire(SearchIndexerSubscriber::class)

email/spool.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ this spool, use the following configuration:
5454
// config/packages/swiftmailer.php
5555
$container->loadFromExtension('swiftmailer', array(
5656
// ...
57-
'spool' => array('type' => 'memory')
57+
'spool' => array('type' => 'memory'),
5858
));
5959
6060
.. _spool-using-a-file:

0 commit comments

Comments
 (0)