Skip to content

Commit b5d1df3

Browse files
Juragerbarryvdh
authored andcommitted
Laravel 5.6 support added (barryvdh#784)
* Laravel 5.6 support added Laravel 5.6 uses Symfony's http-kernel 4.0, exportValue has been deprecated since 3.2 and fully removed in 4.0 * Laravel 5.6 support added Laravel 5.6 uses Symfony's http-kernel 4.0, exportValue has been deprecated since 3.2 and fully removed in 4.0
1 parent 7dd4edb commit b5d1df3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/DataCollector/GateCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use DebugBar\DataCollector\MessagesCollector;
66
use Illuminate\Contracts\Auth\Access\Gate;
77
use Illuminate\Contracts\Auth\Access\Authorizable;
8-
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
8+
use Symfony\Component\VarDumper\Cloner\VarCloner;
99

1010
/**
1111
* Collector for Laravel's Auth provider
@@ -20,7 +20,7 @@ class GateCollector extends MessagesCollector
2020
public function __construct(Gate $gate)
2121
{
2222
parent::__construct('gate');
23-
$this->exporter = new ValueExporter();
23+
$this->exporter = new VarCloner();
2424

2525
$gate->after([$this, 'addCheck']);
2626
}
@@ -33,7 +33,7 @@ public function addCheck(Authorizable $user, $ability, $result, $arguments = [])
3333
'ability' => $ability,
3434
'result' => $result,
3535
snake_case(class_basename($user)) => $user->id,
36-
'arguments' => $this->exporter->exportValue($arguments),
36+
'arguments' => $this->exporter->cloneVar($arguments),
3737
], $label, false);
3838
}
3939
}

src/DataCollector/ViewCollector.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use DebugBar\Bridge\Twig\TwigCollector;
66
use Illuminate\View\View;
7-
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;
7+
use Symfony\Component\VarDumper\Cloner\VarCloner;
88

99
class ViewCollector extends TwigCollector
1010
{
@@ -21,7 +21,7 @@ public function __construct($collectData = true)
2121
$this->collect_data = $collectData;
2222
$this->name = 'views';
2323
$this->templates = [];
24-
$this->exporter = new ValueExporter();
24+
$this->exporter = new VarCloner();
2525
}
2626

2727
public function getName()
@@ -75,7 +75,7 @@ public function addView(View $view)
7575
} else {
7676
$data = [];
7777
foreach ($view->getData() as $key => $value) {
78-
$data[$key] = $this->exporter->exportValue($value);
78+
$data[$key] = $this->exporter->cloneVar($value);
7979
}
8080
$params = $data;
8181
}

0 commit comments

Comments
 (0)