Skip to content

Commit a6e1282

Browse files
dunglasxabbuh
authored andcommitted
[PHPUnitBridge] Explain how to show stack traces
1 parent 2c280ba commit a6e1282

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/phpunit_bridge.rst

+16
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,22 @@ the value ``"weak"`` which will make the bridge ignore any deprecation notices.
181181
This is useful to projects that must use deprecated interfaces for backward
182182
compatibility reasons.
183183

184+
Display the Full Stack Trace
185+
----------------------------
186+
187+
By default, the PHPUnit Bridge displays only deprecation messages.
188+
To show the full stack trace related to a deprecation, set the value of ``SYMFONY_DEPRECATIONS_HELPER``
189+
to a regular expression matching the deprecation message.
190+
191+
For example, if the following deprecation notice is thrown::
192+
193+
1x: Doctrine\Common\ClassLoader is deprecated.
194+
1x in EntityTypeTest::setUp from Symfony\Bridge\Doctrine\Tests\Form\Type
195+
196+
Running the following command will display the full stack trace::
197+
198+
SYMFONY_DEPRECATIONS_HELPER='/Doctrine\\Common\\ClassLoader is deprecated\./' ./vendor/bin/simple-phpunit
199+
184200
Time-sensitive Tests
185201
---------------------
186202

0 commit comments

Comments
 (0)