Skip to content

Commit 90ebc8b

Browse files
committed
Merge branch '4.4'
* 4.4: Updates the tip explaining how to set the base phpunit version
2 parents e7659af + e5021e4 commit 90ebc8b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

components/phpunit_bridge.rst

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

452452
use App\MyClass;
453453
use PHPUnit\Framework\TestCase;
454-
use Symfony\Bridge\PhpUnit\ClockMock;
454+
use Symfony\Bridge\PhpUnit\ClockMock;
455455

456456
/**
457457
* @group time-sensitive
@@ -643,10 +643,13 @@ If you have installed the bridge through Composer, you can run it by calling e.g
643643
644644
.. tip::
645645

646-
Set the ``SYMFONY_PHPUNIT_VERSION`` env var to e.g. ``5.5`` to change the
647-
base version of PHPUnit to ``5.5`` instead of the default ``5.3``.
646+
It's possible to change the base version of PHPUnit by setting the
647+
``SYMFONY_PHPUNIT_VERSION`` env var in the ``phpunit.xml.dist`` file (e.g.
648+
``<server name="SYMFONY_PHPUNIT_VERSION" value="5.5" />``). This is the
649+
preferred method as it can be committed to your version control repository.
648650

649-
It's also possible to set this env var in the ``phpunit.xml.dist`` file.
651+
It's also possible to set ``SYMFONY_PHPUNIT_VERSION`` as a real env var
652+
(not defined in a :ref:`dotenv file <config-dot-env>`).
650653

651654
.. tip::
652655

0 commit comments

Comments
 (0)