Closed
Description
Q | A |
---|---|
Bug report? | – |
Feature request? | – |
BC Break report? | – |
RFC? | – |
Symfony version | 2.8 |
The filterTrace method is deprecated since version 2.8 and will be removed in 3.0. Use the castTraceStub method instead.
Can not understand how should I change them. I have this code:
$trace = $exception->getTrace();
ExceptionCaster::filterTrace($trace, false);
This code transforms $trace
variable from
[
[
'function' => '%methodName%',
'class' => '%FQCN%',
'type' => '->',
'args' => [/* ... */],
],
// ...
]
to this format:
[
[
'call' => '%FQCN%->%methodName%',
'file' => '',
],
// ...
]
How can I do the same by using ExceptionCaster::castTraceStub
? I'm tried to use It like this:
$trace = $exception->getTrace();
$trace = ExceptionCaster::castTraceStub(
new TraceStub($trace),
$trace,
new Stub(),
true
);