upgrade to laravel 7 and set branch to v2
This commit is contained in:
@@ -50,7 +50,7 @@ class DumpServerServiceProvider extends ServiceProvider
|
||||
]);
|
||||
|
||||
VarDumper::setHandler(function ($var) use ($connection) {
|
||||
(new Dumper($connection))->dump($var);
|
||||
$this->app->makeWith(Dumper::class, ['connection' => $connection])->dump($var);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Dumper
|
||||
public function dump($value)
|
||||
{
|
||||
if (class_exists(CliDumper::class)) {
|
||||
$data = (new VarCloner)->cloneVar($value);
|
||||
$data = $this->createVarCloner()->cloneVar($value);
|
||||
|
||||
if ($this->connection === null || $this->connection->write($data) === false) {
|
||||
$dumper = in_array(PHP_SAPI, ['cli', 'phpdbg']) ? new CliDumper : new HtmlDumper;
|
||||
@@ -46,4 +46,12 @@ class Dumper
|
||||
var_dump($value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return VarCloner
|
||||
*/
|
||||
protected function createVarCloner(): VarCloner
|
||||
{
|
||||
return new VarCloner();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user