Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Simple Html Dom Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • What PHP and Symfony version constraints does the bundle declare, and do they resolve against our runtime at all?
  • Is the transitive simple_html_dom pinned, forked, or floating — and who patches it when PHP 8.x breaks it?
  • What does the wrapper actually add beyond container registration: caching, config, error translation, retries? If the answer is "nothing," skip the bundle.
  • Is there any test coverage or CI we can point to as evidence of health?
  • What is the actual requirement — lenient parsing of malformed third-party HTML, CSS-selector ergonomics, or both? That determines whether DomCrawler, masterminds/html5, or a maintained simple_html_dom fork (voku/simple_html_dom) is the right primitive.
  • Is JS-rendered content in scope? If yes, no parser solves it and the tooling decision is a headless browser, not this package.

Integration Approach

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:

  1. Do not adopt. Define an internal contract (e.g. HtmlExtractor) in the app namespace and back it with DomCrawler. Zero new risk, reversible, and the abstraction is the durable asset.
  2. Vendor the primitive, not the bundle. If 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.
  3. Adopt the bundle only if you are in a Symfony app where it already resolves and the wrapper demonstrably provides config/DI value. Even then, fork it into the monorepo with a named owner.

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.

  1. Spike (½–1 day): reproduce the real use case with DomCrawler and, separately, simple_html_dom directly; diff output on your actual corpus (malformed pages included).
  2. Decide the abstraction: internal HtmlExtractor/HtmlParser contract. This decision is cheap now and expensive after three features bind to a node API.
  3. Implement behind the contract with the maintained option.
  4. Record an ADR capturing the build vs. adopt vs. vendor call, owner, and review date.
  5. Only then add a Composer dependency, pinned exactly — and only if the spike showed a capability gap DomCrawler cannot close.

Operational Impact

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.

  • Silent parse degradation on malformed HTML — output shifts with no exception, which is the worst class of failure to detect in production.
  • Memory exhaustion on large documents or in daemonized workers, surfacing as intermittent worker kills.
  • PHP 8 runtime upgrade breakage with no upstream fix — a scheduled platform upgrade becomes an unscheduled rewrite.
  • Composer resolution breakage when the transitive pin collides with other packages, blocking unrelated dependency work.
  • Supply-chain exposure from an unmaintained transitive dependency with no disclosure channel.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings