Skip to content

Commit 5531572

Browse files
committed
minor #10062 [PHPUnitBridge] Explain how to show stack traces (dunglas)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 2.8 branch instead (closes #10062). Discussion ---------- [PHPUnitBridge] Explain how to show stack traces <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- a6e1282 [PHPUnitBridge] Explain how to show stack traces
2 parents 2c280ba + a6e1282 commit 5531572

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/phpunit_bridge.rst

Lines changed: 16 additions & 0 deletions
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)