- Published on
TYPO3 <3 Symfony: dump() + dd()
- Authors
- Name
- Susanne Moog
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