Skip to content

Commit 568852a

Browse files
committed
Merge branch '4.1'
* 4.1: Fix Use Class fix RoleVoter behaviour description Fix a configuration-block not rendered Fixed the versionadded directive (RST syntax) Add missing container argument for ServiceLocatorTagPass::register() call fix order of member vars Added the missing XML and PHP formats to some config Update external_parameters.rst
2 parents e115fed + 4f9ad67 commit 568852a

File tree

8 files changed

+38
-15
lines changed

8 files changed

+38
-15
lines changed

components/messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ First, create your sender::
175175

176176
class ImportantActionToEmailSender implements SenderInterface
177177
{
178-
private $toEmail;
179178
private $mailer;
179+
private $toEmail;
180180

181181
public function __construct(\Swift_Mailer $mailer, string $toEmail)
182182
{

configuration/environments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ environment through your browser:
267267

268268
You can achieve this by using a special ``imports`` key:
269269

270-
.. configuration-block:
270+
.. configuration-block::
271271

272272
.. code-block:: yaml
273273

configuration/external_parameters.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,10 @@ create a class that implements
515515
:class:`Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface` and
516516
then, define a service for that class::
517517

518+
use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
519+
518520
class LowercasingEnvVarProcessor implements EnvVarProcessorInterface
519521
{
520-
private $container;
521-
522-
public function __construct(ContainerInterface $container)
523-
{
524-
$this->container = $container;
525-
}
526-
527522
public function getEnv($prefix, $name, \Closure $getEnv)
528523
{
529524
$env = $getEnv($name);

logging/monolog_exclude_http_codes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
How to Configure Monolog to Exclude Specific HTTP Codes from the Log
77
====================================================================
88

9-
..versionadded:: 4.1
9+
.. versionadded:: 4.1
1010
The ability to exclude log messages based on their status codes was
1111
introduced in Symfony 4.1 and MonologBundle 3.3.
1212

messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message handler. It's a class with an ``__invoke`` method::
4949
// src/MessageHandler/MyMessageHandler.php
5050
namespace App\MessageHandler;
5151

52-
use Symfony\Component\Messenger\Handler;
52+
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
5353

5454
class MyMessageHandler implements MessageHandlerInterface
5555
{

reference/twig_reference.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,8 @@ is_granted
305305
**type**: ``string``
306306

307307
Returns ``true`` if the current user has the given role. If several roles are
308-
passed in an array, returns ``true`` if the user has all of them or at least one
309-
of them, depending on the value of this option:
310-
:ref:`security.access_decision_manager.strategy <security-voters-change-strategy>`.
308+
passed in an array, ``true`` is returned if the user has at least one of
309+
them.
311310

312311
Optionally, an object can be passed to be used by the voter. More information
313312
can be found in :ref:`security-template`.

routing.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,35 @@ with a locale. This can be done by defining a different prefix for each locale
241241
en: '' # don't prefix URLs for English, the default locale
242242
nl: '/nl'
243243
244+
.. code-block:: xml
245+
246+
<!-- config/routes/annotations.xml -->
247+
<?xml version="1.0" encoding="UTF-8" ?>
248+
<routes xmlns="http://symfony.com/schema/routing"
249+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
250+
xsi:schemaLocation="http://symfony.com/schema/routing
251+
http://symfony.com/schema/routing/routing-1.0.xsd">
252+
253+
<import resource="../src/Controller/" type="annotation">
254+
<!-- don't prefix URLs for English, the default locale -->
255+
<prefix locale="en"></prefix>
256+
<prefix locale="nl">/nl</prefix>
257+
</import>
258+
</routes>
259+
260+
.. code-block:: php
261+
262+
// config/routes/annotations.php
263+
use Symfony\Component\Routing\RouteCollection;
264+
265+
$routes = $loader->import('../src/Controller/', 'annotation');
266+
267+
// don't prefix URLs for English, the default locale
268+
$app->addPrefix('/', array('_locale' => 'en'));
269+
$app->addPrefix('/nl', array('_locale' => 'nl'));
270+
271+
return $routes;
272+
244273
.. _routing-requirements:
245274

246275
Adding {wildcard} Requirements

service_container/service_subscribers_locators.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ will share identical locators amongst all the services referencing them::
375375
'logger' => new Reference('logger'),
376376
);
377377

378-
$myService->addArgument(ServiceLocatorTagPass::register($locateableServices));
378+
$myService->addArgument(ServiceLocatorTagPass::register($container, $locateableServices));
379379
}
380380

381381
.. _`Command pattern`: https://en.wikipedia.org/wiki/Command_pattern

0 commit comments

Comments
 (0)