thepixeldeveloper/sitemap
Thepixeldeveloper/sitemap is a PHP package for building XML sitemaps and sitemap indexes with a fluent API. It integrates with Laravel to generate, cache, and serve search-engine-friendly sitemaps.
Architecture fit. thepixeldeveloper/sitemap is a framework-agnostic PHP library that builds sitemap XML through a small object graph (SitemapIndex → UrlSet → Url) and serializes via DOMDocument. It has no knowledge of Laravel routing, Eloquent, queues, caching, or config. That is a reasonable fit for one narrow job — an offline/CLI job that turns a query result into a sitemap file — and a poor fit for anything request-scoped. There is no service provider, facade, or publishable config in the package, so "Laravel integration" is entirely glue code you write and own: an artisan command, a route or a static file, an Eloquent query, and a cache/storage write. The library itself is the smallest part of the effort.
Coupling and substitutability. Coupling is low and the API surface is small, which is the package's main redeeming quality. If it is wrapped behind an internal SitemapBuilder interface from day one, swapping it later is a contained task rather than a refactor. If it is called directly from controllers and commands, the exit cost rises with every call site.
Integration feasibility. Composer install is trivial; Composer resolution is the blocker. The last release was 2020-04-03 and the repository is archived, so the php and dependency constraints reflect the PHP 7.x era. On Laravel 10/11/12 (PHP 8.1+) the install will typically fail on platform requirements rather than on a real code incompatibility — the DOM-based code itself is mostly benign under PHP 8. That distinction matters for the estimate: the fix is usually a private fork with a relaxed composer.json, not a rewrite. But a private fork is still a fork, and it must be registered as a VCS/path repository, versioned, and patched by your team.
Technical risk. Risk is asymmetric and worth stating plainly:
Key questions for the owning team.
composer require and captured the failure?hreflang alternate links, lastmod accuracy, image/video/news extensions, or gzip? The package's coverage of these is the deciding functional factor.Bottom line. At 135 stars, archived, and four-plus years past its last release, this is not a package to adopt in 2026 for new work. spatie/laravel-sitemap is the maintained, Laravel-native default and covers the same surface. This package is only defensible as existing technical debt with low blast radius — worth containing and scheduling out, not worth an emergency.
Stack fit. Best case is a Laravel 8/9 application on PHP 7.4–8.0, where the package installs cleanly and needs only wrapper code. On PHP 8.1+ assume a fork. Either way the integration pattern should be identical: a single artisan command (or queued job) that queries models, maps to Url objects, writes to storage/app/public/sitemap.xml, and a static route or CDN path serving that file. Do not generate on request; the library's DOM approach holds the full document in memory.
Migration path. Three viable options, in order of preference for most teams:
spatie/laravel-sitemap — actively maintained, Laravel-native (routes, Eloquent crawling, tags, caching, robots.txt linkage). Recommended for greenfield and for any team already planning a PHP 8 upgrade.XMLWriter — ~100–200 lines, zero dependencies, streaming (constant memory). Genuinely competitive here because the protocol is simple and the package is small; this is often the right answer for a TPM weighing a fork against a 200-line replacement.Compatibility. The functional risk on PHP 8 is low; the constraint risk is high. Verify: ext-dom and ext-libxml present; no reliance on removed 7.x behaviors; whether the code emits deprecation notices under 8.x that would pollute logs at scale. If the choice is fork-over-replace, budget a compatibility test pass rather than assuming breakage.
Sequencing.
composer.json comment so the next developer doesn't reach for it.Maintenance. Upstream maintenance is zero — you are the maintainer. For a fork, budget roughly 1–2 engineer-days per year (dependency bumps, PHP major upgrades, incidental patching) plus the one-time setup. For a replacement, the ongoing cost drops to library upgrades you'd do anyway. The hidden cost of keeping it is organizational: every dependency audit, security review, and new-hire onboarding generates the same "why is this archived package here?" conversation until it's resolved.
Support. No maintainer, no issue triage, no security advisories. Community answers for a 135-star archived package are effectively nonexistent, so internal expertise is the only support channel. The mitigating factor is codebase size — it is small enough that any competent PHP developer can read the whole thing — so this is a knowledge-transfer task, not a specialized-hire task.
Scaling. Two hard ceilings to design around:
Failure modes.
Mitigations are cheap and should be treated as part of the integration, not optional: validate generated XML against the sitemap XSD in CI, assert non-zero URL count, alert on scheduled-job failure, and monitor the sitemap endpoint's HTTP status externally.
Ramp-up. Low. The API is learnable in under an hour and the domain — sitemap XML — is well documented publicly. The ramp-up risk is not comprehension but context: the next owner needs the architecture decision record explaining why a fork exists, where it is pinned, and what the exit trigger is (realistically, the next PHP major). Without that note, the package will either be defended reflexively or ripped out carelessly.
How can I help you explore Laravel packages today?