martyrer/simple-html-dom-bundle
A Symfony bundle that integrates PHP Simple HTML DOM into your application, giving you a convenient service for parsing and manipulating HTML using jQuery-like selectors. Load pages, traverse the DOM, and extract or edit elements with straightforward, readable syntax.
Architecture fit
simple_html_dom library. A Laravel codebase has no concept of Bundle subclasses or auto-discovery through PackageManifest — the delivered artifact is fundamentally foreign to the target stack.composer require the underlying library (or a maintained fork like voku/simple_html_dom) and bind it in our own service provider. That is roughly 30 minutes of engineering work and gives us full ownership.Integration feasibility
framework-bundle constraints will hard-conflict with a modern Laravel app pulling symfony/* v6/v7. Installation may be impossible, not merely awkward.Technical risk
symfony/dom-crawler + symfony/css-selector (already transitively present in most Laravel apps) and by PHP 8.4's native Dom\HTMLDocument.load_file on local paths adds SSRF/local-file surface if inputs aren't constrained.Key questions
Stack fit
symfony/dom-crawler + symfony/css-selector behind Http:: or Guzzle — both are common transitive dependencies, actively maintained, and idiomatic.Dom\HTMLDocument + XPath removes the third-party dependency entirely for straightforward extraction.voku/simple_html_dom) and bind it ourselves — no Symfony layer involved.Migration path
HtmlExtractor interface, implement one adapter delegating to Simple HTML DOM, and treat the library as an implementation detail.Compatibility
composer require to fail on modern Laravel; a --ignore-platform-reqs workaround is a red flag, not a solution.str_get_html, simple_html_dom) collide with anything already autoloaded.Sequencing
Maintenance
Support
Scaling
memory_limit mid-job; enforce per-document size caps, max_execution_time, and explicit timeouts rather than relying on process recycling.Failure modes
null/false inconsistently, causing null-property errors far from the parse site.Ramp-up
TPM verdict: Do not adopt. This package adds a Symfony-shaped layer to a decaying parser with zero ecosystem validation, and — critically for a Laravel stack — is the wrong framework entirely. If HTML extraction is a real product need, invest the ~1–2 engineer-days in DomCrawler or native DOM behind an owned interface. The maintenance and incident cost of this dependency exceeds its integration cost within the first quarter.
How can I help you explore Laravel packages today?