From 4df4f1ae4c20ec285a941e9460574b2d05c9a10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 13 Jul 2018 14:43:05 +0200 Subject: [PATCH 1/2] [PHPUnitBridge] Explain how to show stack traces --- components/phpunit_bridge.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index f50a3b760d6..71d70944dcc 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -232,6 +232,22 @@ times (order matters):: @trigger_error('The second argument of the "Bar" method is deprecated.', E_USER_DEPRECATED); } +Display the Full Stack Trace +---------------------------- + +By default, the PHPUnit Bridge displays only deprecation messages. +To show the full stack trace related to a deprecation, set the value of ``SYMFONY_DEPRECATIONS_HELPER`` +to a regular expression matching the deprecation message. + +For example, if the following deprecation notice is thrown:: + + 1x: Doctrine\Common\ClassLoader is deprecated. + 1x in EntityTypeTest::setUp from Symfony\Bridge\Doctrine\Tests\Form\Type + +Running the following command will display the full stack trace:: + + SYMFONY_DEPRECATIONS_HELPER='/Doctrine\\Common\\ClassLoader is deprecated\./' ./phpunit src/Symfony/Bridge/Doctrine + Time-sensitive Tests -------------------- From 150d6d3c360226203252c48c539060e84f69cc97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 13 Jul 2018 14:44:05 +0200 Subject: [PATCH 2/2] Update phpunit_bridge.rst --- components/phpunit_bridge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 71d70944dcc..7dbba932c48 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -246,7 +246,7 @@ For example, if the following deprecation notice is thrown:: Running the following command will display the full stack trace:: - SYMFONY_DEPRECATIONS_HELPER='/Doctrine\\Common\\ClassLoader is deprecated\./' ./phpunit src/Symfony/Bridge/Doctrine + SYMFONY_DEPRECATIONS_HELPER='/Doctrine\\Common\\ClassLoader is deprecated\./' ./vendor/bin/simple-phpunit Time-sensitive Tests --------------------