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

Zend Dom Laravel Package

zendframework/zend-dom

Zend\Dom provides tools for parsing and querying HTML and XML documents, including CSS selector support translated to XPath via Zend\Dom\Query. A legacy Zend Framework component for DOM inspection and extraction.

Deep Wiki
Context7

Product Decisions This Supports

  • Feature-level: HTML/data extraction. This is the "pull structured fields out of messy markup" primitive — scraping vendor price lists, parsing emailed HTML reports, extracting rows from legacy CMS exports, reading third-party dashboards you're contractually allowed to consume. The CSS-selector-over-DOM API lets a PM spec an extraction rule in product language ("every row in table#invoice-lines") and an engineer implement it in a handful of lines rather than hand-rolling XPath.
  • Build vs buy (really: borrow vs build vs adopt-a-fork). The honest framing is that this package is a thin, well-understood wrapper over PHP's built-in ext-dom that adds CSS-selector translation. Writing that yourself is roughly a day of work and a permanent maintenance tax. The decision isn't "is this worth money" (it's BSD-3, free) — it's "which of three near-equivalents do we standardize on": this (archived), laminas/laminas-dom (the maintained successor), or symfony/dom-crawler (broader, actively maintained, heavier).
  • Roadmap reality: treat as frozen capability. Archived, last release 2019, no upstream roadmap, no security response. It is a done utility, not a growing one. Do not roadmap anything that depends on HTML5 parsing fidelity, modern CSS selector coverage, or PHP-version currency — those asks will go unanswered.
  • Where it fits: internal back-office tooling, batch/offline jobs, one-off data migrations, test assertions against rendered HTML, report generation. Low blast radius, stable inputs.
  • Where it does not fit: anything parsing untrusted HTML inside a request path (you're relying on an unpatched parser for XXE/DoS/XSS-adjacent posture), customer-facing paths with uptime dependencies, or codebases on PHP 8.1+ where you can't absorb deprecation noise.
  • Dependency-policy decision point. Adopting an abandoned package is a policy exception in most orgs — expect Composer audit tooling and SCA scans to flag it. Decide that exception consciously and time-box it; don't discover it during a release review.

Read on the scores: high opportunity/completeness with 29 stars and a 2019 release is the signature of "stable and finished," not "gaining traction." Score it as maturity, not momentum.

When to Consider This Package

Adopt (or, more likely, tolerate) when:

  • You're in a legacy Zend Framework application or it's already arriving transitively — don't spend a sprint excising it if it's working.
  • Your runtime is pinned to PHP 7.x and you have no near-term 8.1+ migration.
  • The workload is internal, batch, or dev-time; failures are annoying, not customer-visible.
  • Your extraction rules are simple and stable — tables, links, headings, a couple of attributes — and you specifically want CSS-selector ergonomics without pulling in a larger crawler framework.
  • You need something with a permissive license and no procurement cycle.

Look elsewhere when:

  • Greenfield. Use laminas/laminas-dom — same lineage, maintained, the intended successor. Choosing the Zend-namespaced artifact for new code is choosing a migration you'll schedule later for no benefit today.
  • You need real HTML5 tolerance. Real-world markup is broken; masterminds/html5 (optionally with symfony/dom-crawler) handles it, this era of tooling is more XML-strict.
  • Selector coverage matters. If your rules need anything beyond basic CSS selectors, verify against your actual cases before committing.
  • A security response SLA is required. Archived means unpatched, full stop.
  • PHP 8.1+ is your baseline and you want a clean deprecation log.
  • Your org blocks abandoned packages. Then the answer is simply no, and the useful output of this evaluation is the Laminas recommendation.

Migration cost, for planning: low. The API surface is narrow; a swap to Laminas is typically small, and a swap to Symfony DomCrawler is a contained refactor if you've kept queries in one place.

How to Pitch It (Stakeholders)

To executives: This is a commodity parsing utility — no license cost, no vendor relationship, no revenue line. Its value is measured in engineer-days not spent writing XPath by hand. The genuine risk is staleness: it's an archived component with no one shipping fixes. That risk is acceptable only because it's a small, isolated, replaceable piece; the mitigation is a one-to-two-day swap to the maintained fork if it ever becomes load-bearing. Recommendation: don't invest in it, don't fear it — standardize on the maintained successor for anything new, and leave existing usage alone until it's convenient to move it.

To engineering: Narrow scope, does one thing well — query a DOM with CSS selectors over ext-dom/XPath. Expect it to work; expect zero fixes. Before adopting, run a short spike to confirm behavior on your PHP version, since the last release predates current runtimes. Wrap it behind your own thin query/parse interface so a swap to Laminas or Symfony is a one-file change rather than a hunt. Keep it out of request paths that parse third-party HTML.

To the security/data team: It parses untrusted markup with an unmaintained parser. That's fine for offline jobs on data you already trust; it is not fine for user-supplied HTML in a live path. Flag the distinction explicitly rather than arguing about the package as a whole.

Framing tip: Lead with "this is finished, not thriving." The high completeness score invites the wrong conclusion; the correct read is that the code is mature and the project is closed. That reframes the conversation from "should we bet on this?" to "how cheaply can we route around it?" — which is the decision that actually needs a yes.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums