vardumper/extended-htmldocument
ExtendedHtmlDocument is a PHP library that extends DOMDocument with convenient helpers for loading, querying, and manipulating HTML. It reduces boilerplate for common DOM tasks, making it easier to find elements, traverse markup, and apply changes in scraping or transformation workflows.
Context of this release: 0.3.5 is a patch bump on a pre-1.0 package, and the release notes contain no substantive content — only an auto-generated compare/0.3.4...0.3.5 link. There is no changelog entry, no CVE reference, no migration note. This assessment is therefore based on the package's established shape and must be treated as provisional until the diff is reviewed by an engineer. Under SemVer, 0.x patch bumps are explicitly permitted to carry breaking changes, so the low version number is not evidence of low risk.
Architecture fit
vardumper/extended-htmldocument is a standalone PHP library, not a Laravel package. It ships no service provider, no facade, no config file, and no publishable assets. It will not appear in config/app.php providers and will not be discoverable via package auto-discovery.ExtendedHtmlDocument that subclasses/extended DOMDocument to provide more forgiving, HTML5-style parsing and additional traversal helpers on top of ext-dom (typically via masterminds/html5). It fits applications doing server-side HTML ingestion — scraping, email/HTML sanitization, CMS content transformation, third-party markup normalization, snapshot testing of rendered views.symfony/dom-crawler as a query API. If the team's need is "query HTML with CSS selectors," DomCrawler is the better-shaped dependency.\Dom\HTMLDocument (HTML5-compliant parser) in core. Much of this package's differentiation is being absorbed by the language runtime. Any adoption decision should be framed as a bridge with a defined exit, not a long-term foundation.Integration feasibility
composer require vardumper/extended-htmldocument:^0.3.5. No bootstrapping required.masterminds/html5 and ext-dom; symfony/dom-crawler (Laravel-adjacent, Drupal-adjacent) constrains the same transitive dependency. Expect constraint conflicts on older Laravel/Drupal majors.ext-dom and ext-libxml in the runtime image. Common php:*-alpine builds omit or partially ship these; container base images must be verified before the Composer install is trusted.artisan, the container, or the HTTP kernel. Blast radius is confined to call sites.Technical risk
0.x line means the diff is the only source of truth. Until reviewed, treat 0.3.5 as behaviorally unknown.libxml_use_internal_errors), non-obvious memory behavior, and PHP's evolving handling of dynamic properties on internal classes (deprecations from 8.2 onward).LIBXML_NOENT / network access are not enabled at call sites, and that the package does not alter libxml defaults.Key questions for the maintainer / engineering spike
php, ext-*, and masterminds/html5 constraints, and do they resolve cleanly against our current composer.lock?0.3.x, and is a 1.0 planned?\Dom\HTMLDocument on PHP 8.4+, and does the package already delegate to it?Stack fit
Migration path
DOMDocument instantiation directly at call sites. Introduce a thin internal interface (e.g. HtmlDocumentParser) with a parse(string): Document contract, and implement it with the package. This makes the dependency swappable for native \Dom\HTMLDocument (PHP 8.4+) or symfony/dom-crawler without a second migration.symfony/dom-crawler already exists in the tree, first evaluate whether its bundled HTML5 support covers the need — that avoids adding a second parser dependency entirely.Compatibility
composer.lock: composer require --dry-run vardumper/extended-htmldocument:^0.3.5.ext-dom/ext-libxml; confirm CI matrix covers the PHP versions actually deployed.Sequencing
Maintenance
0.x line requires a manual diff read. Budget a recurring task for this rather than assuming routine composer update safety.^0.3.5 at minimum, exact pin preferred on a 0.x line) and treat upgrades as reviewed changes, not background noise.Support
Scaling
Failure modes
libxml_use_internal_errors set by one call site changing behavior in another; wrap parsing in try/finally that restores prior state.masterminds/html5 bump conflicting with DomCrawler, discovered at composer update time.Ramp-up
DOMDocument methods plus conveniences.How can I help you explore Laravel packages today?