8000 [5.6] Fix dd() helper colors by tillkruss · Pull Request #25086 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[5.6] Fix dd() helper colors #25086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use Illuminate\Container\Container;
use Illuminate\Support\Debug\Dumper;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Log\LogServiceProvider;
use Illuminate\Support\ServiceProvider;
use Symfony\Component\VarDumper\VarDumper;
use Illuminate\Events\EventServiceProvider;
use Illuminate\Routing\RoutingServiceProvider;
use Symfony\Component\HttpKernel\HttpKernelInterface;
Expand Down Expand Up @@ -146,6 +148,8 @@ public function __construct($basePath = null)
$this->registerBaseServiceProviders();

$this->registerCoreContainerAliases();

$this->registerVarDumper();
}

/**
Expand Down Expand Up @@ -190,6 +194,16 @@ protected function registerBaseServiceProviders()
$this->register(new RoutingServiceProvider($this));
}

/**
* Register Laravel's dumper.
*
* @return void
*/
protected function registerVarDumper()
{
VarDumper::setHandler([new Dumper, 'dump']);
}

/**
* Run the given array of bootstrap classes.
*
Expand Down
17 changes: 0 additions & 17 deletions src/Illuminate/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,23 +544,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