symfony/dom-crawler
50.9
Adequate · 17 November 2026
2.6k
lines of production code
PHP
primary language
5
measurements over time
What this system is
Behavioural changes
DomCrawler component refactored with modern PHP features and new URI resolution logic
The DomCrawler component has been significantly refactored to use modern PHP 8+ features, including constructor property promotion, native type declarations, and the removal of the legacy SplObjectStorage inheritance in favor of a native array-based node list. A new UriResolver class and AbstractUriElement base class centralize URI resolution logic, improving how relative links and form actions are handled against a base URI. The Form class now extends Link to share this URI logic and uses a new internal FormFieldRegistry to manage complex multi-dimensional form fields. Additionally, the component now supports \<area\> and \<link\> tags as navigable links, allows selecting images via new methods, and enforces stricter security by disabling external entity loading in XML parsing.
(repo-wide) · high confidence
Enhanced form field handling and API modernization in DomCrawler
This update modernizes the DomCrawler form field classes with strict PHP types and improved behavior. ChoiceFormField now supports selecting options by visible text via the new selectByText() method and correctly identifies disabled options. FileFormField upload logic has been updated to preserve file extensions in temporary copies, and InputFormField now recognizes \<button\> elements. Additionally, FormField gains a getLabel() method to retrieve associated labels, and all classes have been refactored with native return types and strict comparisons.
Field · high confidence
Test coverage
Added test fixtures for Alpine.js, encoding, and file extension handling; Added tests for DomCrawler assertion constraints; Added unit tests for DomCrawler components; Added unit tests for DomCrawler form field classes; New DOM Crawler test constraints for selector assertions.
Dependencies
Initial composer.json for Symfony DomCrawler
Added a composer.json manifest for the Symfony DomCrawler library, defining it as a PSR-4 autoloaded package with a minimum PHP requirement of 8.4.1 and dependencies on symfony/polyfill-ctype and symfony/polyfill-mbstring, while listing symfony/css-selector as a development dependency.
(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 52.2 → 50.9 (-1.3)
- Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 55.5 → 55.1 (-0.4)
- Architecture 100.0 → 90.9 (-9.1)
- Maturity 42.0 → 40.7 (-1.3)
- Readiness 46.8 → 46.8 (0.0)
- Security 100.0 → 100.0 (0.0)
New (5)
- Circular dependency (Form.php)
- Edited copy of a member (11 corresponding lines) (Crawler.php)
- Edited copy of a member (19 corresponding lines) (AbstractUriElement.php)
- Further sole-owners (lower concentration)
- Off-boarding risk: anonymized user #1
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/dom-crawler 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 17 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 0bf3e73ed0d98abc2be097896a048cbc1518b98a — 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.85+preprod-eba6548ac50f.