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.
<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.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.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."Consider it only when all of the following hold:
Look elsewhere when:
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:
AppKernel, bundle lifecycle, command subclassing). If we're on Laravel, the conversation ends here and no spike is warranted.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.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.How can I help you explore Laravel packages today?