Skip to content

Commit 50e5a45

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: Specified camelCase format limitation for logger channel autowiring [HTTP Client][CS] Add missing commas Fixed the use of Session with RequesStack add missing mapping type (PHP Attributes) Update bootstrap5.rst
2 parents 0e98401 + 9098d5d commit 50e5a45

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

form/bootstrap5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class to the ``row_attr`` option.
187187

188188
.. code-block:: php
189189
190-
$builder->add('email', CheckboxType::class, [
190+
$builder->add('email', EmailType::class, [
191191
'label' => '@',
192192
'row_attr' => [
193193
'class' => 'input-group',

http_client.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,9 @@ Add an ``extra.curl`` option in your configuration to pass those extra options::
840840
// ...
841841
'extra' => [
842842
'curl' => [
843-
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V6
844-
]
845-
]
843+
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V6,
844+
],
845+
],
846846
]);
847847

848848
.. note::

logging/channels_handlers.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ How to Autowire Logger Channels
177177

178178
Starting from `MonologBundle`_ 3.5 you can autowire different Monolog channels
179179
by type-hinting your service arguments with the following syntax:
180-
``Psr\Log\LoggerInterface $<channel>Logger``. The ``<channel>`` must have been
181-
:ref:`predefined in your Monolog configuration <monolog-channels-config>`.
180+
``Psr\Log\LoggerInterface $<camelCased channel name> + Logger``. The ``<channel>``
181+
must have been :ref:`predefined in your Monolog configuration <monolog-channels-config>`.
182182

183-
For example to inject the service related to the ``app`` logger channel,
183+
For example to inject the service related to the ``foo_bar`` logger channel,
184184
change your constructor like this:
185185

186186
.. code-block:: diff
187187
188188
- public function __construct(LoggerInterface $logger)
189-
+ public function __construct(LoggerInterface $appLogger)
189+
+ public function __construct(LoggerInterface $fooBarLogger)
190190
{
191-
$this->logger = $appLogger;
191+
$this->logger = $fooBarLogger;
192192
}
193193
194194
.. _`MonologBundle`: https://github.com/symfony/monolog-bundle

reference/configuration/doctrine.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ you can control. The following configuration options exist for a mapping:
265265
``type``
266266
........
267267

268-
One of ``annotation`` (the default value), ``xml``, ``yml``, ``php`` or
268+
One of ``annotation`` (for PHP annotations; it's the default value),
269+
``attribute`` (for PHP attributes), ``xml``, ``yml``, ``php`` or
269270
``staticphp``. This specifies which type of metadata type your mapping uses.
270271

272+
See `Doctrine Metadata Drivers`_ for more information about this option.
273+
271274
``dir``
272275
.......
273276

@@ -453,3 +456,4 @@ is ``true``, the DoctrineBundle will prefix the ``dir`` configuration with
453456
the path of the bundle.
454457

455458
.. _DBAL documentation: https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/configuration.html
459+
.. _`Doctrine Metadata Drivers`: https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/metadata-drivers.html

session.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,16 @@ controllers if you type-hint an argument with
149149

150150
public function someMethod()
151151
{
152+
$session = $this->requestStack->getSession();
153+
152154
// stores an attribute in the session for later reuse
153-
$this->requestStack->getSession()->set('attribute-name', 'attribute-value');
155+
$session->set('attribute-name', 'attribute-value');
154156

155157
// gets an attribute by name
156-
$foo = $this->session->get('foo');
158+
$foo = $session->get('foo');
157159

158160
// the second argument is the value returned when the attribute doesn't exist
159-
$filters = $this->session->get('filters', []);
161+
$filters = $session->get('filters', []);
160162

161163
// ...
162164
}

0 commit comments

Comments
 (0)