Skip to content

Commit

Permalink
[5.7] Remove dd() helper (#25087)
Browse files Browse the repository at this point in the history
* use Symfony’s dd() helper

* satisfy StyleCI
  • Loading branch information
tillkruss authored and taylorotwell committed Aug 5, 2018
1 parent 7e0e431 commit df7810a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 75 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
use CachingIterator;
use JsonSerializable;
use IteratorAggregate;
use Illuminate\Support\Debug\Dumper;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Support\Jsonable;
use Symfony\Component\VarDumper\VarDumper;
use Illuminate\Contracts\Support\Arrayable;

/**
Expand Down Expand Up @@ -320,7 +320,7 @@ public function dump()
(new static(func_get_args()))
->push($this)
->each(function ($item) {
(new Dumper)->dump($item);
VarDumper::dump($item);
});

return $this;
Expand Down
26 changes: 0 additions & 26 deletions src/Illuminate/Support/Debug/Dumper.php

This file was deleted.

29 changes: 0 additions & 29 deletions src/Illuminate/Support/Debug/HtmlDumper.php

This file was deleted.

18 changes: 0 additions & 18 deletions src/Illuminate/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use Illuminate\Support\Str;
use Illuminate\Support\Optional;
use Illuminate\Support\Collection;
use Illuminate\Support\Debug\Dumper;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\HigherOrderTapProxy;

Expand Down Expand Up @@ -544,23 +543,6 @@ function data_set(&$target, $key, $value, $overwrite = true)
}
}

if (! function_exists('dd')) {
/**
* Dump the passed variables and end the script.
*
* @param mixed $args
* @return void
*/
function dd(...$args)
{
foreach ($args as $x) {
(new Dumper)->dump($x);
}

die(1);
}
}

if (! function_exists('e')) {
/**
* Escape HTML special characters in a string.
Expand Down

0 comments on commit df7810a

Please sign in to comment.