Skip to content

Commit 59a7a08

Browse files
A-Lawrencebarryvdh
authored andcommitted
Replaced use of removed ValueCollector with VarCloner (barryvdh#787)
* Replaced use of removed ValueCollector with VarCloner As per L5.6, Symfony 4 is now used. As such, VarCloner must be used in place of ValueCollector. * Changed PHPDoc for exporter.
1 parent f0018d3 commit 59a7a08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DataCollector/EventCollector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
use DebugBar\DataCollector\TimeDataCollector;
55
use Illuminate\Events\Dispatcher;
66
use Illuminate\Support\Str;
7-
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
7+
use Symfony\Component\VarDumper\Cloner\VarCloner;
88

99
class EventCollector extends TimeDataCollector
1010
{
1111
/** @var Dispatcher */
1212
protected $events;
1313

14-
/** @var ValueExporter */
14+
/** @var VarCloner */
1515
protected $exporter;
1616

1717
public function __construct($requestStartTime = null)
1818
{
1919
parent::__construct($requestStartTime);
2020

21-
$this->exporter = new ValueExporter();
21+
$this->exporter = new VarCloner();
2222
}
2323

2424
public function onWildcardEvent($name = null, $data = [])
@@ -76,7 +76,7 @@ protected function prepareParams($params)
7676
if (is_object($value) && Str::is('Illuminate\*\Events\*', get_class($value))) {
7777
$value = $this->prepareParams(get_object_vars($value));
7878
}
79-
$data[$key] = htmlentities($this->exporter->exportValue($value), ENT_QUOTES, 'UTF-8', false);
79+
$data[$key] = htmlentities($this->exporter->cloneVar($value), ENT_QUOTES, 'UTF-8', false);
8080
}
8181

8282
return $data;

0 commit comments

Comments
 (0)