mushroomcloud/simple-html-dom-bundle
A Symfony bundle that integrates the Simple HTML DOM library, offering service configuration for parsing, traversing, and manipulating HTML documents in PHP. Handy for scraping, content extraction, and DOM-style edits in Symfony apps.
Architecture fit. This is a thin wrapper that exposes the (legacy) simple_html_dom parser through framework wiring — a Symfony-style bundle (...Bundle class, a namespaced config key) rather than a Laravel-native service provider + facade. For a Laravel codebase, fit is moderate at best: the parsing capability is usable, but the integration surface follows Symfony conventions and will need either a small adapter (service provider binding the parser, config published under config/) or direct instantiation of the underlying classes, bypassing the bundle entirely. The 2.0 release changes nothing about the architecture — it is a pure vendor/namespace rename — so any fit concerns from 1.x carry over unchanged.
Integration feasibility. Mechanically straightforward but multi-surface. The rename touches four distinct integration points, each of which can fail independently:
| Surface | 1.x | 2.0 |
|---|---|---|
| Composer requirement | martyrer/simple-html-dom-bundle |
mushroomcloud/simple-html-dom-bundle |
| Namespace | Martyrer\SimpleHtmlDomBundle |
MushroomCloud\SimpleHtmlDomBundle |
| Bundle/registration class | MartyrerSimpleHtmlDomBundle |
MushroomCloudSimpleHtmlDomBundle |
| Config key | martyrer_simple_html_dom |
mushroom_cloud_simple_html_dom |
Namespace and class swaps are codemod-able (Rector, sed, IDE refactor). The config key rename is the sharp edge: it can appear in config/*.php, .env files, config() calls, container parameters, and any environment-specific deployment config outside the repo. A missed reference typically fails silently — the config resolves to null and the code falls back to defaults — rather than throwing.
Technical risk.
replace directive in composer.json, or a published upgrade guide beyond the four-line note. Assume a hard cutover.simple_html_dom is a long-unmaintained parsing library with known PHP 8 deprecation and memory issues. The wrapper's health is capped by the underlying library's health, which the release notes do not address.martyrer → mushroomcloud) usually signals a maintainer handoff or fork. Abandonment of the old Packagist name, security-advisory coverage, and future release cadence are all unknowns.Key questions for the maintainer.
martyrer/simple-html-dom-bundle marked abandoned on Packagist with the new name as the suggested replacement?simple_html_dom parser still the intended engine, or is a maintained replacement (e.g., symfony/dom-crawler, masterminds/html5) on the roadmap?Stack fit. PHP 8.x + Composer, framework-agnostic core. In a Laravel app, treat the bundle as an optional convenience layer: register a service provider that binds the parser, publish config under the new key, and avoid depending on Symfony bundle auto-registration. If the app only uses the parser in a handful of places, evaluating a direct dependency on a maintained DOM library is a cheaper long-term path than carrying the wrapper.
Migration path.
martyrer, Martyrer, martyrer_simple_html_dom. Include compiled artifacts (cached config, bootstrap/cache/, optimized classmaps).composer why martyrer/simple-html-dom-bundle).composer remove martyrer/simple-html-dom-bundle && composer require mushroomcloud/simple-html-dom-bundle:^2.0. Commit the lockfile.app/, config/, tests/, and any string-based service IDs. Add a temporary CI grep gate that fails on any remaining martyrer occurrence..env, .env.example, and every config() / env() read site. Set the old and new keys side-by-side for one deploy if any config lives outside the repo.config:clear, cache:clear, composer dump-autoload -o, opcache reset on deploy.Compatibility. The rename is not backward compatible; old and new cannot coexist in one autoloader without a replace directive the release notes do not mention. Multi-service estates must migrate all consumers of a shared package together, or pin per-service and accept a temporarily mixed fleet. Watch for the config key being read by infrastructure that deploys independently of the application (e.g., worker images built from a different branch).
Sequencing. Ship as a single, small, isolated change rather than bundling it with feature work — the value of that discipline is that any parsing regression is unambiguously attributable to the rename. Roll out to a canary service first if the parser sits on a user-facing path, then widen. Budget a short window for stale-cache incidents immediately post-deploy.
Maintenance. Ownership has moved to a new vendor; ongoing maintenance now depends on that maintainer's engagement, which the release notes give no signal on. Set a review checkpoint (e.g., 90 days) to confirm the new repository shows activity, responds to issues, and publishes advisories. Track the underlying simple_html_dom library separately — it is the real maintenance liability, and the wrapper cannot patch around its PHP-version or memory defects.
Support. Expect low support throughput. A single-maintainer, thin-wrapper package typically has no SLA, no LTS branch, and no backport policy; internal teams should be prepared to vendor the code or fork it. The absence of an upgrade guide or compatibility shim for a rename-only major is itself a signal about support ergonomics.
Scaling. Parsing cost is per-document, in-process, and memory-bound — simple_html_dom builds a full tree in PHP memory, which is materially heavier than streaming or native-extension alternatives. Under load this surfaces as worker memory growth and GC pressure rather than CPU saturation. Mitigations: cap document size before parsing, cache parsed/extracted results keyed by content hash, push bulk parsing to dedicated queue workers with tuned memory_limit, and keep the parser off latency-critical request paths. None of this is changed by 2.0.
Failure modes.
null, parser runs on defaults. Detect with a startup assertion that the new key resolves; this is the highest-likelihood and lowest-visibility failure in the whole migration.composer update.Ramp-up. Low for the parser itself — the API is small and well-trodden — but the migration adds friction disproportionate to the code change: roughly half a day to a day for a typical single application, longer where config lives outside version control or where multiple services share the dependency. Document the new vendor name, namespace, and config key in the team's dependency register and onboarding notes at the same time, so the rename is not re-discovered by the next engineer who greps for the old name.
How can I help you explore Laravel packages today?