diff --git a/src/DataCollector/GateCollector.php b/src/DataCollector/GateCollector.php index 73ef225e..31de257d 100644 --- a/src/DataCollector/GateCollector.php +++ b/src/DataCollector/GateCollector.php @@ -5,7 +5,7 @@ use DebugBar\DataCollector\MessagesCollector; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Contracts\Auth\Access\Authorizable; -use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; +use Symfony\Component\VarDumper\Cloner\VarCloner; /** * Collector for Laravel's Auth provider @@ -20,7 +20,7 @@ class GateCollector extends MessagesCollector public function __construct(Gate $gate) { parent::__construct('gate'); - $this->exporter = new ValueExporter(); + $this->exporter = new VarCloner(); $gate->after([$this, 'addCheck']); } @@ -33,7 +33,7 @@ public function addCheck(Authorizable $user, $ability, $result, $arguments = []) 'ability' => $ability, 'result' => $result, snake_case(class_basename($user)) => $user->id, - 'arguments' => $this->exporter->exportValue($arguments), + 'arguments' => $this->exporter->cloneVar($arguments), ], $label, false); } } diff --git a/src/DataCollector/ViewCollector.php b/src/DataCollector/ViewCollector.php index 44466259..4805aa90 100644 --- a/src/DataCollector/ViewCollector.php +++ b/src/DataCollector/ViewCollector.php @@ -4,7 +4,7 @@ use DebugBar\Bridge\Twig\TwigCollector; use Illuminate\View\View; -use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; +use Symfony\Component\VarDumper\Cloner\VarCloner; class ViewCollector extends TwigCollector { @@ -21,7 +21,7 @@ public function __construct($collectData = true) $this->collect_data = $collectData; $this->name = 'views'; $this->templates = []; - $this->exporter = new ValueExporter(); + $this->exporter = new VarCloner(); } public function getName() @@ -75,7 +75,7 @@ public function addView(View $view) } else { $data = []; foreach ($view->getData() as $key => $value) { - $data[$key] = $this->exporter->exportValue($value); + $data[$key] = $this->exporter->cloneVar($value); } $params = $data; }