RSS Amplifier

susi.dev · Nov 19, 2021

TYPO3 <3 Symfony: dump() + dd()

0
Sign in to vote or save

Susanne Moog · susi.dev

TYPO3 ships with Symfony components under the hood. One of the small but powerful helpers is VarDumper.

Enable pretty dumps

In development context, VarDumper formats output nicely and detects CLI vs. HTML automatically.

use Symfony\Component\VarDumper\VarDumper;

VarDumper::dump($variable); // or dump($variable)

Stop execution immediately when you need a hard break:

dd($payload); // dump and die

Tips

  • In CLI, dumps render as colored text; in the backend (HTML), assets are inlined
  • Do not leave dumps in production; guard with context checks
  • For PSR loggers, prefer structured logs in code paths you keep long‑term; use dd() only while hunting an issue

Read the original on susi.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.