Skip to content

Commit 3528249

Browse files
committed
[PhpUnitBridge] Add an example for SYMFONY_PHPUNIT_REQUIRE
1 parent c10d923 commit 3528249

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

components/phpunit_bridge.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -938,18 +938,27 @@ If you have installed the bridge through Composer, you can run it by calling e.g
938938
then set the ``SYMFONY_PHPUNIT_REMOVE`` env var to ``symfony/yaml``.
939939

940940
It's also possible to set this env var in the ``phpunit.xml.dist`` file.
941-
941+
942942
.. tip::
943943

944944
It is also possible to require additional packages that will be installed along
945-
the rest of the needed PHPUnit packages using the ``SYMFONY_PHPUNIT_REQUIRE``
945+
with the rest of the needed PHPUnit packages using the ``SYMFONY_PHPUNIT_REQUIRE``
946946
env variable. This is specially useful for installing PHPUnit plugins without
947-
having to add them to your main ``composer.json`` file.
947+
having to add them to your main ``composer.json`` file. The required packages
948+
need to be separated with a space.
948949

949-
.. versionadded:: 5.3
950+
.. code-block:: xml
951+
952+
<!-- phpunit.xml.dist -->
953+
<!-- ... -->
954+
<php>
955+
<env name="SYMFONY_PHPUNIT_REQUIRE" value="vendor/name:^1.2 vendor/name2:^3"/>
956+
</php>
957+
958+
.. versionadded:: 5.3
950959

951-
The ``SYMFONY_PHPUNIT_REQUIRE`` env variable was introduced in
952-
Symfony 5.3.
960+
The ``SYMFONY_PHPUNIT_REQUIRE`` env variable was introduced in
961+
Symfony 5.3.
953962

954963
Code Coverage Listener
955964
----------------------

0 commit comments

Comments
 (0)