Skip to content

Commit afd792b

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Updates the tip explaining how to set the base phpunit version
2 parents 3b35e9e + 7780a7e commit afd792b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

components/phpunit_bridge.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ different class, do it explicitly using ``ClockMock::register(MyClass::class)``:
403403

404404
use App\MyClass;
405405
use PHPUnit\Framework\TestCase;
406-
use Symfony\Bridge\PhpUnit\ClockMock;
406+
use Symfony\Bridge\PhpUnit\ClockMock;
407407

408408
/**
409409
* @group time-sensitive
@@ -595,8 +595,13 @@ If you have installed the bridge through Composer, you can run it by calling e.g
595595
596596
.. tip::
597597

598-
Set the ``SYMFONY_PHPUNIT_VERSION`` env var to e.g. ``5.5`` to change the
599-
base version of PHPUnit to ``5.5`` instead of the default ``5.3``.
598+
It's possible to change the base version of PHPUnit by setting the
599+
``SYMFONY_PHPUNIT_VERSION`` env var in the ``phpunit.xml.dist`` file (e.g.
600+
``<server name="SYMFONY_PHPUNIT_VERSION" value="5.5" />``). This is the
601+
preferred method as it can be committed to your version control repository.
602+
603+
It's also possible to set ``SYMFONY_PHPUNIT_VERSION`` as a real env var
604+
(not defined in a :doc:`dotenv </components/dotenv>` file).
600605

601606
It's also possible to set this env var in the ``phpunit.xml.dist`` file.
602607

0 commit comments

Comments
 (0)