-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DX] deprecated build shipped debug fuctions, allow using custom debu…
…g package instead; add local d() and dd() functions (#4759)
- Loading branch information
1 parent
0bdace5
commit fa2a806
Showing
4 changed files
with
57 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Tracy\Dumper; | ||
|
||
// helpful functions to create new rector rules | ||
|
||
if (! function_exists('dd')) { | ||
function dd(mixed $value, int $depth = 2): never | ||
{ | ||
d($value, $depth); | ||
die; | ||
} | ||
} | ||
|
||
if (! function_exists('d')) { | ||
function d(mixed $value, int $depth = 2): void | ||
{ | ||
Dumper::dump($value, [ | ||
Dumper::DEPTH => $depth, | ||
]); | ||
} | ||
} |