8000 Merge branch '4.1' · symfony/symfony-docs@7f19b26 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f19b26

Browse files
committed
Merge branch '4.1'
* 4.1: Improve is_granted documentation Fix phpunit command Replace extra ... [Messenger] Fix messenger.routing send_and_handle config Mentioned the 60 second timeout of processes fix #310430: DomCrawler component selectButton() docs update
2 parents 8299066 + c3f8c85 commit 7f19b26

File tree

6 files changed

+35
-15
lines changed

6 files changed

+35
-15
lines changed

components/dom_crawler.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,13 @@ Forms
402402
~~~~~
403403

404404
Special treatment is also given to forms. A ``selectButton()`` method is
405-
available on the Crawler which returns another Crawler that matches a button
406-
(``input[type=submit]``, ``input[type=image]``, or a ``button``) with the
407-
given text. This method is especially useful because you can use it to return
405+
available on the Crawler which returns another Crawler that matches ``<button>``
406+
or ``<input type="submit">`` or ``<input type="button">`` elements (or an
407+
``<img>`` element inside them). The string given as argument is looked for in
408+
the 8000 ``id``, ``alt``, ``name``, and ``value`` attributes and the text content of
409+
those elements.
410+
411+
This method is especially useful because you can use it to return
408412
a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
409413
form that the button lives in::
410414

components/process.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ instead::
330330
Process Timeout
331331
---------------
332332

333-
You can limit the amount of time a process takes to complete by setting a
334-
timeout (in seconds)::
333+
By default processes have a timeout of 60 seconds, but you can change it passing
334+
a different timeout (in seconds) to the ``setTimeout()`` method::
335335

336336
use Symfony\Component\Process\Process;
337337

messenger.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ A class of messages can also be routed to multiple senders by specifying a list:
325325
),
326326
));
327327
328-
By specifying a ``null`` sender, you can also route a class of messages to a sender
328+
By specifying the ``send_and_handle`` option, you can also route a class of messages to a sender
329329
while still having them passed to their respective handler:
330330

331331
.. configuration-block::
@@ -336,7 +336,9 @@ while still having them passed to their respective handler:
336336
framework:
337337
messenger:
338338
routing:
339-
'My\Message\ThatIsGoingToBeSentAndHandledLocally': [amqp, ~]
339+
'My\Message\ThatIsGoingToBeSentAndHandledLocally':
340+
senders: [amqp]
341+
send_and_handle: true
340342
341343
.. code-block:: xml
342344
@@ -352,9 +354,8 @@ while still having them passed to their respective handler:
352354
353355
<framework:config>
354356
<framework:messenger>
355-
<framework:routing message-class="My\Message\ThatIsGoingToBeSentAndHandledLocally">
357+
<framework:routing message-class="My\Message\ThatIsGoingToBeSentAndHandledLocally" send-and-handle="true">
356358
<framework:sender service="amqp" />
357-
<framework:sender service="" />
358359
</framework:routing>
359360
</framework:messenger>
360361
</framework:config>
@@ -366,7 +367,10 @@ while still having them passed to their respective handler:
366367
$container->loadFromExtension('framework', array(
367368
'messenger' => array(
368369
'routing' => array(
369-
'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array('amqp', null),
370+
'My\Message\ThatIsGoingToBeSentAndHandledLocally' => array(
371+
'senders' => array('amqp'),
372+
'send_and_handle' => true,
373+
),
370374
),
371375
),
372376
));

reference/twig_reference.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,19 @@ is_granted
298298
{{ is_granted(role, object = null, field = null) }}
299299
300300
``role``
301-
**type**: ``string``
301+
**type**: ``string``, ``string[]``
302302
``object`` *(optional)*
303303
**type**: ``object``
304304
``field`` *(optional)*
305305
**type**: ``string``
306306

307-
Returns ``true`` if the current user has the required role. Optionally,
308-
an object can be pasted to be used by the voter. More information can be
309-
found in :ref:`security-template`.
307+
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>`.
311+
312+
Optionally, an object can be passed to be used by the voter. More information
313+
can be found in :ref:`security-template`.
310314

311315
logout_path
312316
~~~~~~~~~~~

service_container/autowiring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ An Autowiring Example
1919
---------------------
2020

2121
Imagine you're building an API to publish statuses on a Twitter feed, obfuscated
22-
with `ROT13`_... a fun encoder that shifts all characters 13 letters forward in
22+
with `ROT13`_, a fun encoder that shifts all characters 13 letters forward in
2323
the alphabet.
2424

2525
Start by creating a ROT13 transformer class::

testing.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ command:
3131
3232
$ ./bin/phpunit
3333
34+
.. note::
35+
36+
The ``./bin/phpunit`` command is created by :doc:`Symfony Flex </setup/flex>`
37+
when installing the ``phpunit-bridge`` package. If the command is missing, you
38+
can remove the package (``composer remove symfony/phpunit-bridge``) and install
39+
it again. Another solution is to remove the project's ``symfony.lock`` file and
40+
run ``composer install`` to force the execution of all Symfony Flex recipes.
41+
3442
PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your
3543
Symfony application.
3644

0 commit comments

Comments
 (0)
0