symfony/var-dumper
50.8
Adequate · 14 November 2026
8k
lines of production code
PHP
primary language
7
measurements over time
What this system is
Features
Add dump() and dd() debugging helper functions
The application now includes global \dump()\ and \dd()\ helper functions in \Resources/functions/dump.php\ to simplify variable inspection during development. The \dump()\ function accepts variadic arguments, supports named arguments for clearer output labels, and returns the inspected values to allow chaining. The \dd()\ function (dump and die) behaves similarly but terminates script execution after dumping; in web contexts, it also sends a 500 Internal Server Error header to indicate an abnormal termination, while in CLI environments it exits with code 1.
Resources/functions · high confidence
Initial release of the VarDumper component
This change introduces the VarDumper component, providing a \dump()\ function as a superior alternative to \var\_dump()\ for inspecting PHP variables. The component includes a \VarDumper\ class that manages cloners and dumpers, supporting output formats via the \VAR\_DUMPER\_FORMAT\ environment variable (html, cli, or server). It features context-aware dumping (source location, request context), keyboard-accessible HTML toggles, and support for various PHP extensions and types (FFI, Fiber, WeakMap, UUIDs, etc.). The release also includes test infrastructure via \phpunit.xml.dist\ and distribution packaging via \.gitattributes\.
(repo-wide) · high confidence
New CLI and HTML descriptors for VarDumper command output
The VarDumper command now uses dedicated descriptor classes to format dump output. The new CliDescriptor renders dumps in the terminal using Symfony Console's table and section helpers, escaping context strings to prevent terminal injection. The new HtmlDescriptor generates styled HTML output, including hyperlinks for source files, tags for controller and project directory context, and unique deduplication identifiers. A common DumpDescriptorInterface defines the contract for these formatters.
Command/Descriptor · high confidence
New CSS and JS assets for the HTML VarDumper descriptor
Added \Resources/css/htmlDescriptor.css\ and \Resources/js/htmlDescriptor.js\ to style and enhance the HTML output of the VarDumper component. The CSS provides a modern layout with specific syntax highlighting for dumped variables and prevents selection of control characters, while the JavaScript automatically hides duplicate headers in the dump list to reduce visual clutter.
Resources/css · high confidence
New context providers for CLI, HTTP requests, and source code
The VarDumper component now includes a new ContextProviderInterface and three implementations: CliContextProvider (provides command-line arguments and a unique identifier for CLI dumps), RequestContextProvider (provides URI, HTTP method, and controller information for web requests), and SourceContextProvider (provides file, line, code excerpt, and project directory details for source-based dumps). These providers enable richer contextual metadata to be attached to dump data, particularly when sending dumps to a server dumper.
Dumper/ContextProvider · high confidence
New server:dump command for centralized dump collection
A new \server:dump\ command has been added to the VarDumper component, allowing users to start a dedicated server that collects and displays \var\_dump\ output in a single place. This command supports multiple output formats, including CLI and HTML, and integrates with shell completion for easier usage. It provides a centralized way to debug applications by aggregating dump data from various sources.
Command · high confidence
Standalone VarDumper server script added
A new executable script, Resources/bin/var-dump-server, has been added to allow starting the VarDumper server independently. This script bootstraps the Symfony Console application and the DumpServer, enabling users to collect and output dumps in multiple formats from a single place. It includes a guard to ensure it is only run in CLI contexts and handles autoloading from various Composer directory structures.
Resources/bin · high confidence
VarDumper casters for AddressInfo, AMQP, and FFI types
The VarDumper component now includes dedicated casters for AddressInfo, AMQP, and FFI objects. AddressInfo dumps are enhanced with human-readable flag and protocol names. AMQP connections, channels, queues, exchanges, and envelopes are now displayed with their internal properties (such as login, host, and message headers) and exchange types. FFI CData and CType instances are cast to show their type details, size, alignment, and string contents, with memory access restricted to the current page to prevent crashes.
Caster · high confidence
VarDumper component restructured with new dumper architecture and CSP support
The VarDumper component has been refactored to introduce a new \AbstractDumper\ base class and a \DataDumperInterface\, establishing a cleaner separation between dumping logic and data cloning. This change adds a \ContextualizedDumper\ to attach metadata to dumps via context providers and a \ServerDumper\ to forward serialized data to an external server. For users, the \HtmlDumper\ now supports configurable themes (light and dark) and includes Content Security Policy (CSP) nonce injection for both scripts and styles, while the \CliDumper\ offers improved color handling and display options.
Dumper · high confidence
VarDumper: New server-side dump collection and client connection components
The VarDumper component now includes dedicated classes for server-based dump collection. The new \Server\\Connection\ class handles the client side, establishing a TCP connection to a specified host and sending serialized \Data\ objects along with context information. The new \Server\\DumpServer\ class implements the server side, listening for incoming connections, receiving payloads, and deserializing them using a restricted set of allowed classes (\Data\, \Stub\, \ClassDumpStub\) for security. It logs received payloads and passes the deserialized data and context to a provided callback for processing.
Server · high confidence
Behavioural changes
Simplified ThrowingCasterException constructor and error message
The ThrowingCasterException class no longer accepts a caster argument in its constructor; it now only takes the previous throwable. The exception message has been updated to explicitly state that an unexpected exception was thrown from a caster, using the previous exception's class name and message for context.
Exception · high confidence
VarDumper Cloner rewritten for modern PHP and expanded type support
The VarDumper Cloner component has been significantly refactored to support PHP 8+ features and modernize its internal architecture. The legacy PhpCloner has been removed and replaced by a new VarCloner that uses a breadth-first queue algorithm and native PHP 7.4+ features like ReflectionReference for accurate hard-reference detection. The core data structures have been updated: the Stub class now uses typed properties and optimized serialization, the Cursor class provides detailed dumping state, and the Data class now implements ArrayAccess, Countable, IteratorAggregate, and Stringable for better usability. Additionally, the AbstractCloner now includes a comprehensive set of default casters for a wide range of PHP extensions (DOM, PDO, Reflection, Spl, Intl, Redis, Memcached, etc.) and Symfony components, ensuring that complex objects are dumped with semantic clarity rather than raw internal state.
Cloner · high confidence
Test coverage
Added VarDumperTestTrait for standardized dump assertions; Added test coverage for VarDumper casters; Added test coverage for VarDumper dumpers and functions; Added test fixtures for VarDumper coverage; Added tests for VarDumper CLI and HTML descriptors; Added tests for VarDumper Server Connection; Added tests for VarDumper context providers; Added tests for VarDumperTestTrait configuration and non-scalar expectations; Added tests for dump() and dd() function behaviors; Added tests for server:dump command completion; Added unit tests for VarDumper Cloner components.
Dependencies
Symfony VarDumper requires PHP 8.4.1 and updates Symfony dependencies
The VarDumper component now requires PHP 8.4.1 or higher, reflecting a significant shift in minimum runtime requirements. Additionally, development dependencies for Symfony Console, HttpKernel, Process, and Uid have been updated to support versions 7.4 and 8.0, while the Twig dependency now allows versions 3.12 and 4.0. These changes ensure compatibility with the latest Symfony ecosystem versions and modern PHP features.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 51 (-0.6)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 57 → 53 (-3.4)
- Architecture 97 → 96 (-0.3)
- Maturity 42 → 42 (-0.1)
- Readiness 45 → 45 (-0.1)
- Security 97 → 97 (+0.0)
Resolved (3)
- Documentation: no installation or build instructions (README.md)
- No ADRs found
- Off-boarding risk: anonymized user #1
New (5)
- Edited copy of a member (12 corresponding lines) (Caster/ConstStub.php)
- Edited copy of a member (8 corresponding lines) (Caster/SymfonyCaster.php)
- No ADRs found (composer.json)
- No assertions: testLinkStubWithNonHttpUrl (Tests/Caster/StubCasterTest.php)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 10 commits — 9 feature/other, 1 fixes
By area
- (repo) — 7 commits
- Caster/Caster.php — 1 commit
- Dumper/HtmlDumper.php — 1 commit
- Tests/Caster — 1 commit
Notable commits
- fix: bug #68060 [VarDumper] Don't turn object property names into dump attributes and link only to http(s) URLs (nicolas-grekas)
- change: Merge branch '5.4' into 6.4
- change: Merge branch '6.4' into 7.4
- change: Merge branch '7.4' into 8.1
- change: Merge branch '7.4' into 8.1
- change: Merge branch '8.1' into 8.2
- change: Merge branch '8.1' into 8.2
- change: [VarDumper] Don't send HTTP requests in curl tests
- change: [VarDumper] Don't turn object property names into dump attributes and link only to http(s) URLs
- change: [VarDumper] Escape the content type of images in HtmlDumper
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
symfony/var-dumper was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 459bfdcf52cdea470ff75ce9a81b91acf6b90964 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-859b6d22580d.