iloh/simple-html-dom-bundle
Symfony bundle integrating the simple-html-dom PHP library, exposing HTML parsing and DOM manipulation as a service. Parse, traverse, and edit HTML documents with a familiar API, simplifying scraping and document processing in Symfony applications.
Architecture fit. This is a Symfony bundle — a DI extension plus a thin service wrapper around the legacy simple_html_dom parser. The bundle contributes container wiring and convenience, not parsing capability; all real behavior lives in the unmaintained upstream library. Against a Laravel codebase it is architecturally orthogonal: no service provider, no facade, no publishable config, no auto-discovery. For a TPM this matters because it changes the buy/adopt calculus — you are not buying integration, you are buying a dependency hop plus an ownership burden. The only scenario where the bundle's contribution has value is a legacy Symfony 2/3-era app where it is already registered and working.
Integration feasibility. Low effort to try, high effort to own safely. The wrapper could be reproduced in Laravel in under an hour as a single service provider binding the underlying parser. So the practical integration feasibility of the bundle is near zero-value, while the feasibility of the capability (parse HTML, CSS-select nodes) is high via symfony/dom-crawler + symfony/css-selector or PHP 8.4's native \Dom\HTMLDocument. The gap between "we can parse HTML" and "this package is how we parse HTML" is the entire decision.
Technical risk. High and asymmetric. Signals: 0 stars, 0 dependents, score 0.03, single maintainer, wrapper around an abandoned SourceForge-era library. There is no issue traffic, no release cadence, no visible CI, and no security disclosure process. Risk vectors are (a) PHP 8.x friction in the transitive library (dynamic property deprecations, nullable-string patterns), (b) memory growth on large/deeply nested documents, (c) Composer constraint conflicts on modern runtimes, and (d) supply-chain exposure with no audit trail. None of these are theoretical — they are the known pain profile of simple_html_dom. The wrapper adds a second trust hop without adding capability, which is a strictly worse risk posture than depending on the library directly behind your own adapter.
Key questions.
simple_html_dom pinned, forked, or floating — and who patches it when PHP 8.x breaks it?DomCrawler, masterminds/html5, or a maintained simple_html_dom fork (voku/simple_html_dom) is the right primitive.Stack fit. Poor for Laravel; plausible only for a legacy Symfony app already resolving it. The Laravel-idiomatic equivalents are symfony/dom-crawler with symfony/css-selector (jQuery-style selectors, maintained, PHP 8 clean, frequently already a transitive dependency), native ext-dom/DOMDocument for simple cases, and masterminds/html5 when HTML5-tolerant recovery matters. If the specific draw is simple_html_dom's find() API ergonomics, voku/simple_html_dom is the maintained fork. All of these are drop-in behind an internal interface.
Migration path. In preference order:
HtmlExtractor) in the app namespace and back it with DomCrawler. Zero new risk, reversible, and the abstraction is the durable asset.simple_html_dom semantics are genuinely required, depend on the library (or voku fork) directly, pin exactly, and wrap it in the internal contract. Skip the Symfony bundle entirely — it is dead weight in Laravel.Compatibility. Expect the first blocker to be composer.json platform constraints — bundles of this vintage typically cap at Symfony 4/5 and PHP 7.x. On a Laravel 10/11/12 runtime this usually fails at composer require, which is itself a useful signal: the package cannot even enter the dependency graph without constraint loosening, and loosening constraints on an unmaintained wrapper is the wrong first move. Verify PHP 8.4 deprecation behavior in the transitive library before any estimate is committed.
Sequencing.
DomCrawler and, separately, simple_html_dom directly; diff output on your actual corpus (malformed pages included).HtmlExtractor/HtmlParser contract. This decision is cheap now and expensive after three features bind to a node API.DomCrawler cannot close.Maintenance. Zero upstream maintenance. A 0-star, 0-dependent wrapper around an abandoned library means the team is the maintainer from day one: PHP version bumps, transitive security advisories, Composer audit noise, and fork-and-patch work all land internally. Budget a recurring review line item (~1 engineer-day/quarter) and put it in the risk register explicitly rather than assuming someone else handles it.
Support. None in any conventional sense — no issue triage, no release cadence, no CVE response, no semver discipline to reason about. Your escalation path is "we fork it." That is an acceptable posture for a non-critical internal tool and an unacceptable one for anything on a revenue or compliance path.
Scaling. simple_html_dom builds a full DOM in userland PHP objects and has documented memory-growth behavior on large or deeply nested documents. For bulk scraping, batch imports, or long-running queue workers this means per-job memory creep, daemonized-worker exhaustion, and a real need to isolate parsing into short-lived processes or enforce per-worker memory_limit. DomCrawler/libxml is C-backed and materially cheaper per document; at volume the difference shows up as infrastructure cost, not just code quality.
Failure modes.
Ramp-up. Developer ramp-up is trivial and that is the trap: the API is small and familiar, so the adoption cost looks like an afternoon and hides a recurring ownership tail. The real ramp-up is organizational — writing the ADR, standing up the internal contract, and establishing a fork-and-patch process if you go that route. Rough envelope: ~1–2 engineer-days to adopt safely with a recurring ~1 day/quarter, versus ~1 engineer-day total for DomCrawler behind the same contract with no recurring tail. For stakeholders, the message is: no budget impact, no timeline impact either way — the difference is a future rewrite we can avoid for free today. Recommendation: do not adopt this bundle for new Laravel work; standardize on a maintained parser behind an internal HtmlExtractor contract so the choice stays reversible.
How can I help you explore Laravel packages today?