8000 minor #17968 [PHPUnitBridge] Add an example for `SYMFONY_PHPUNIT_REQU… · symfony/symfony-docs@dc00932 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc00932

Browse files
committed
minor #17968 [PHPUnitBridge] Add an example for SYMFONY_PHPUNIT_REQUIRE (HypeMC)
This PR was merged into the 5.4 branch. Discussion ---------- [PHPUnitBridge] Add an example for `SYMFONY_PHPUNIT_REQUIRE` Adds an example of how to use the `SYMFONY_PHPUNIT_REQUIRE` env variable. Commits ------- 3528249 [PhpUnitBridge] Add an example for SYMFONY_PHPUNIT_REQUIRE
2 parents 4e8b539 + 3528249 commit dc00932

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)
0