Commit 32fb025e authored by git's avatar git Committed by lussoluca

Issue #2999892 by guillermo-simeon: function dd is already defined in symfony since Drupal 8.6

parent 287b15b5
......@@ -324,6 +324,9 @@ if (!function_exists('dd')) {
/**
* Wrapper for DevelDumperManager::debug().
*
* @deprecated since Drupal 8.6.0 because symfony now has dd() as a function.
* Use the ddm() function instead.
*
* @see \Drupal\devel\DevelDumperManager::debug()
*/
function dd($data, $label = NULL) {
......@@ -331,6 +334,17 @@ if (!function_exists('dd')) {
}
}
if (!function_exists('ddm')) {
/**
* Wrapper for DevelDumperManager::debug() to replace previous dd function.
*
* @see \Drupal\devel\DevelDumperManager::debug()
*/
function ddm($data, $label = NULL) {
return \Drupal::service('devel.dumper')->debug($data, $label, 'default');
}
}
/**
* Wrapper for DevelDumperManager::message().
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment