8000 Merge branch '4.2' · symfony/symfony-docs@3f20558 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f20558

Browse files
committed
Merge branch '4.2'
* 4.2: Fix errors in Session methods links [#10796] remove now no longer needed reference Fix the link to in processors.rst Added use statement for UnexpectedValueException
2 parents b60ca36 + db4139e commit 3f20558

File tree

3 files changed

+3
-54
lines changed

3 files changed

+3
-54
lines changed

components/http_foundation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ method tells you if the request contains a session which was started in one of
243243
the previous requests.
244244

245245
.. versionadded:: 4.1
246-
Using :method:`Symfony\\Component\\HttpFoundation\\Request::getSession()`
246+
Using :method:`Symfony\\Component\\HttpFoundation\\Request::getSession`
247247
when no session has been set was deprecated in Symfony 4.1. It will throw
248248
an exception in Symfony 5.0 when the session is ``null``. Check for an existing session
249-
first by calling :method:`Symfony\\Component\\HttpFoundation\\Request::hasSession()`.
249+
first by calling :method:`Symfony\\Component\\HttpFoundation\\Request::hasSession`.
250250

251251
Processing HTTP Headers
252252
~~~~~~~~~~~~~~~~~~~~~~~

logging/processors.rst

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -159,58 +159,6 @@ If you use several handlers, you can also register a processor at the
159159
handler level or at the channel level instead of registering it globally
160160
(see the following sections).
161161

162-
.. tip::
163-
164-
.. versionadded:: 2.4
165-
The autoconfiguration of Monolog processors was introduced in Monolog bundle 2.4.
166-
167-
If you're using the :ref:`default services.yaml configuration <service-container-services-load-example>`,
168-
processors implementing :class:`Monolog\\Processor\\ProcessorInterface`
169-
are automatically registered as services and tagged with ``monolog.processor``,
170-
so you can use them without adding any configuration. The same applies to the
171-
built-in :class:`Symfony\\Bridge\\Monolog\\Processor\\TokenProcessor` and
172-
:class:`Symfony\\Bridge\\Monolog\\Processor\\WebProcessor` processors, which
173-
can be enabled as follows:
174-
175-
.. configuration-block::
176-
177-
.. code-block:: yaml
178-
179-
# config/services.yaml
180-
services:
181-
# Adds the current security token to log entries
182-
Symfony\Bridge\Monolog\Processor\TokenProcessor: ~
183-
# Adds the real client IP to log entries
184-
Symfony\Bridge\Monolog\Processor\WebProcessor: ~
185-
186-
.. code-block:: xml
187-
188-
<!-- config/services.xml -->
189-
<?xml version="1.0" encoding="UTF-8" ?>
190-
<container xmlns="http://symfony.com/schema/dic/services"
191-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
192-
xsi:schemaLocation="http://symfony.com/schema/dic/services
193-
http://symfony.com/schema/dic/services/services-1.0.xsd">
194-
195-
<services>
196-
<!-- Adds the current security token to log entries -->
197-
<service id="Symfony\Bridge\Monolog\Processor\TokenProcessor" />
198-
<!-- Adds the real client IP to log entries -->
199-
<service id="Symfony\Bridge\Monolog\Processor\WebProcessor" />
200-
</services>
201-
</container>
202-
203-
.. code-block:: php
204-
205-
// config/services.php
206-
use Symfony\Bridge\Monolog\Processor\TokenProcessor;
207-
use Symfony\Bridge\Monolog\Processor\WebProcessor;
208-
209-
// Adds the current security token to log entries
210-
$container->register(TokenProcessor::class);
211-
// Adds the real client IP to log entries
212-
$container->register(WebProcessor::class);
213-
214162
Registering Processors per Handler
215163
----------------------------------
216164

validation/custom_constraint.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ The validator class is also simple, and only has one required method ``validate(
6060
use Symfony\Component\Validator\Constraint;
6161
use Symfony\Component\Validator\ConstraintValidator;
6262
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
63+
use Symfony\Component\Validator\Exception\UnexpectedValueException;
6364

6465
class ContainsAlphanumericValidator extends ConstraintValidator
6566
{

0 commit comments

Comments
 (0)
0