SymfonyWorld Online 2021 Winter Edition December 9 – 10, 2021 100% Online 25 talks and 10 workshops

New in Symfony 4.4: Improved dump() Calls in the Console

Symfony 4.4 was released last week, but we'll continue publishing this "New in Symfony 4.4" blog series to mention some of its most notable new features.

Contributed by
Kévin Therage
in #31446.

In addition to new components and big features, new Symfony versions usually add "quality of life" features. These are little features that make you more productive and improve your developer experience in general.

The dump() and dd() helpers provided by the VarDumper component are a lightweight alternative when you don't need full-featured debuggers like Xdebug. However, these helpers behave differently in the browser and the command console.

In the browser, dump() and dd() display both the dumped contents and the file path and line number where they were called. However, in the console you only see the dumped contents, so you don't know where the helper was called:

In Symfony versions prior to 4.4, dumps in the console didn't show their location

Starting from Symfony 4.4, you'll see a ^ character next to the dumped contents. Click on it to go directly to the file and line where the dump was generated:

In Symfony 4.4, console dumps show a clickable marker which points to the location where the dump was generated
Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

New in Symfony 4.4: Improved dump() Calls in the Console

Tweet this


woooaoou!!! nice !!!!
Thanks for making the world a better place, once again!
Does Windows support this kind of console feature?
@Thomas support for this feature doesn't depend on the operating system but on each console/terminal application.

Here you can find a list of terminals/consoles/Apps that support hyperlinks:
Waited sooo long for this small but powerful feature :) thanks
Thanks for this feature ^_^

I have one question : How to configure the Dump so that by default the list of array is closed?

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.