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

Sitemap Xml Bundle Laravel Package

evheniy/sitemap-xml-bundle

SitemapXmlBundle is a Symfony2 bundle that generates sitemap.xml files for your site. Install it via Composer, register it in AppKernel before your main bundle, then extend SiteMapDumpCommand and implement setEntities() to define your domains and page URLs.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy vs. skip for SEO plumbing. A sitemap is a commodity artifact: enumerate canonical URLs, emit a valid <urlset> with lastmod, serve it at /sitemap.xml, reference it from robots.txt. This package sits in the "buy" column only for a narrow, legacy Symfony2 context. The decision it actually informs is how much roadmap capacity sitemap generation deserves at all — typically hours to a couple of days of owned code, not a dependency commitment.
  • Framework-fit is a product constraint, not a detail. This is a Symfony2 bundle (AppKernel registration, bundle lifecycle, SiteMapDumpCommand subclassing). It is not installable or idiomatic in Laravel. For a Laravel roadmap item, the honest answer is "no spike warranted — write it against our own router/Eloquent in ~150 lines or use a maintained package." Catching this in triage saves a sprint of misfired investigation.
  • Roadmap scoping for discoverability. Useful as a reference for the minimum viable capability: canonical URLs only, lastmod from real content timestamps, exclusion of non-200/noindex routes, and a sitemap index once you exceed 50k URLs (which the README itself flags). Anything richer — hreflang alternates, image/video/news extensions, per-locale or per-tenant sitemaps, gzip/streaming — is out of scope here and must be planned as separate work, not assumed as "included."
  • Dependency-risk gate for the architecture review. 1 star, 0 dependents, last release October 2015, README-level docs only, badges that imply health the commit history does not support. This is a canonical example for a standing rule: no customer-facing dependency without an active maintainer, a release within ~24 months, and evidence of production use.
  • Migration planning. The Bundle abstraction was removed in Symfony 4+, and the package is pinned to a decade-old PHP era. If a framework upgrade is anywhere on the roadmap, adopting this converts a small feature into a blocker with unverified PHP 7.4/8.x compatibility and no upstream fixes.
  • Use cases it genuinely covers: a throwaway internal Symfony2 tool, a one-off migration/audit script, or — most usefully — a reference implementation to copy the output contract from before writing your own generator. That last one is the only use I would endorse for this team.

When to Consider This Package

Consider it only when all of the following hold:

  • The codebase is a Symfony 2.x application — not Symfony 3+, not Symfony 4+, and emphatically not Laravel.
  • The sitemap is static or near-static: a fixed URL set regenerated on deploy or cron, with no need for segmenting, pagination into a sitemap index, or multi-locale alternates.
  • You accept the maintenance burden up front: no upstream fixes, no security contact, no community. Your team owns the code from day one — treat it as vendored.
  • Writing it yourself (route/entity enumeration, XML serialization, caching, a controller or command) genuinely costs more than adopting and owning this — which, for a competent team, is rarely true.
  • It is off the critical path: internal tooling, a prototype, or a marketing site where a broken sitemap is an inconvenience rather than a revenue event.

Look elsewhere when:

  • You are on Laravel. Not an option. Use a maintained Laravel sitemap package or, better, a small owned generator plus a route — the URL source is already in Eloquent.
  • You are on modern Symfony. Use the framework's routing/controller layer directly or a currently maintained library.
  • You need scale or richness: 50k+ URL indexes, hreflang, image/video/news namespaces, per-tenant sitemaps, gzip/streaming.
  • You need a supported dependency with a changelog, security contact, and an accountable owner.
  • You need automated freshness tied to content events (cache invalidation on publish).
  • Your org has a dependency policy requiring an active maintainer or a recent release — this fails it on both counts.

How to Pitch It (Stakeholders)

To executives — one line: This is not a package we should adopt; it is a data point telling us sitemap generation is commodity work we should own in-house for a day or two of engineering rather than inherit from an abandoned 2015 Symfony2 bundle.

To executives — the business framing: Sitemaps affect organic discovery, which affects acquisition cost. The risk isn't that the package emits bad XML — it's that an unmaintained, zero-adoption dependency becomes a silent liability at our next framework or PHP upgrade, and its failure mode (a sitemap that quietly stops validating or 404s) is invisible until search rankings slip. The cost to replace it is small and bounded; the cost to depend on it is open-ended. Recommendation: scope sitemap generation as a small, owned feature — not a procurement decision.

To engineering:

  • Framework mismatch first. This is a Symfony2 bundle with no Laravel equivalent for its integration surface (AppKernel, bundle lifecycle, command subclassing). If we're on Laravel, the conversation ends here and no spike is warranted.
  • Use it as reference, not as a dependency. The valuable artifact is the output contract, not the code. Read the fluent entity API, copy the XML shape, write ~100–200 lines against our own router/ORM, and keep our dependency count flat.
  • If we are genuinely trapped on Symfony 2: vendor it, pin the version, add a test asserting the generated XML validates against the sitemap schema, budget a half-day for PHP compatibility patching, and log a ticket to replace it at the next major upgrade.
  • Set the capability bar now, not later. Even a minimal owned generator should include canonical URLs only, exclude non-200/noindex routes, derive lastmod from real content timestamps, and split into a sitemap index before crossing 50k URLs. Decide hreflang and image-extension requirements up front so iteration two isn't a rewrite.
  • Add a dependency-health gate to our checklist. "1 star, 0 dependents, last release 2015" should fail automatically, so we don't re-litigate this per package.
  • Definition of done: the sitemap endpoint returns valid XML, is referenced in robots.txt, is covered by a test, and has a named owner. Whether it took two days to write or five minutes to install is irrelevant next to the fact that someone owns it.
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.
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
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin