Skip to content

Commit 20b4111

Browse files
committed
Force arguments availability on stack trace
1 parent c1986e4 commit 20b4111

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ $jsonRpcSerializer = new JsonRpcCallSerializer(
120120
),
121121
new JsonRpcCallResponseNormalizer(
122122
new JsonRpcResponseNormalizer()
123-
// or `new JsonRpcResponseNormalizer(new JsonRpcResponseErrorNormalizer())` for debug purpose
123+
// Or `new JsonRpcResponseNormalizer(new JsonRpcResponseErrorNormalizer())` for debug purpose
124+
// To also dump arguments, be sure 'zend.exception_ignore_args' ini option is not at true/1
124125
)
125126
);
126127
$responseCreator = new ResponseCreator();

tests/Functional/App/Serialization/JsonRpcResponseErrorNormalizerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public function testShouldNotDisplayTraceOnZeroSize()
9999
*/
100100
public function testShouldShowTraceArguments()
101101
{
102+
ini_set('zend.exception_ignore_args', 0); // Be sure arguments will be available on the stack trace
102103
$exception = $this->prepareException();
103104

104105
$normalizer = new JsonRpcResponseErrorNormalizer(99, true);
@@ -120,6 +121,7 @@ public function testShouldShowTraceArguments()
120121
*/
121122
public function testShouldHideTraceArguments()
122123
{
124+
ini_set('zend.exception_ignore_args', 0); // Be sure arguments will be available on the stack trace
123125
$exception = $this->prepareException();
124126

125127
$normalizer = new JsonRpcResponseErrorNormalizer(99, false);

0 commit comments

Comments
 (0)