Download the PHP package skywalker-labs/sitemapper without Composer
On this page you can find all versions of the php package skywalker-labs/sitemapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skywalker-labs/sitemapper
More information about skywalker-labs/sitemapper
Files in skywalker-labs/sitemapper
Package sitemapper
Short Description A powerful, framework-agnostic Sitemap generator for PHP, Laravel, and Symfony. Create XML, HTML, and Google News sitemaps easily to boost your SEO.
License MIT
Homepage https://github.com/skywalker-labs/sitemapper
Informations about the package sitemapper
Sitemapper is a modern, framework-agnostic PHP package for generating sitemaps in XML, TXT, HTML, and Google News formats. It works seamlessly with Laravel, Symfony, or any PHP project. Features include high test coverage, robust CI, extensible adapters, and support for images, videos, translations, alternates, and Google News.
๐ฆ Part of the Sitemap Family
This is the PHP implementation of our multi-language sitemap library:
- ๐ Sitemapper - PHP 8.2+ implementation with Laravel & Symfony support (this package)
- ๐ npm-sitemap - TypeScript/JavaScript implementation for Node.js and frontend frameworks
- ๐ท go-sitemap - Go implementation for high-performance applications
All implementations share the same API design and features, making it easy to switch between languages or maintain consistency across polyglot projects.
๐ Recommended Projects
If you find Sitemapper useful, you might also be interested in these related projects:
- ๐ php-seo - Comprehensive SEO toolkit for meta tags, structured data, and search optimization
- ๐ค php-chatbot - Conversational AI and chatbot framework for PHP applications
- ๐ฐ php-feed - RSS, Atom, and JSON feed generator for content syndication
- ๐ php-geolocation - IP geolocation, geocoding, and geographic data utilities
โจ Features
- Framework-agnostic: Use in Laravel, Symfony, or any PHP project
- Multiple formats: XML, TXT, HTML, Google News, mobile
- Rich content: Supports images, videos, translations, alternates, Google News
- Modern PHP: Type-safe, extensible, and robust (PHP 8.2+)
- High test coverage: 100% code coverage, CI/CD ready
- Easy integration: Simple API, drop-in for controllers/routes
- Extensible: Adapters for Laravel, Symfony, and more
- Quality tools: PHPStan Level max, PSR-12, comprehensive testing
- Input validation: Built-in URL, priority, and frequency validation
- Type-safe configuration: Fluent configuration with
SitemapConfigclass - Fluent interface: Method chaining for elegant, readable code
๐ Quick Links
- ๐ Installation
- ๐ Usage Examples
- ๐งช Testing & Development
- ๐ค Contributing
- ๐ Security Policy
- ๐ Support & Funding
- ๐ License
๐ฆ Installation
Requirements
- PHP 8.2+
- Composer
Install via Composer
No additional configuration required! The package works out of the box.
๐ Usage
Laravel Example
Controller method:
Route registration:
Advanced:
Symfony Example
Controller:
Route registration:
Generic PHP Example
Advanced Features
add() vs addItem()
You can add sitemap entries using either the add() or addItem() methods:
add() โ Simple, type-safe, one-at-a-time:
addItem() โ Advanced, array-based, supports batch:
- Use
add()for simple, explicit, one-at-a-time additions (recommended for most users). - Use
addItem()for advanced, batch, or programmatic additions with arrays (e.g., when looping over database results).
๐ง New Features
Fluent Interface (Method Chaining)
Chain methods for more elegant and readable code:
Type-Safe Configuration
Configure sitemaps with a fluent, type-safe configuration class:
Input Validation
Enable strict mode to automatically validate all input:
Multiple Format Support
Render sitemaps in different formats:
๐จ Rendering Options
The package provides multiple ways to generate sitemap output:
1. Built-in XML Renderer (Simple)
2. View Templates (Flexible)
For more control, use the included view templates or create your own:
Available view templates in src/views/:
xml.php- Standard XML sitemapxml-mobile.php- Mobile-specific sitemapgoogle-news.php- Google News sitemapsitemapindex.php- Sitemap indextxt.php- Plain text formathtml.php- HTML format
๐งช Testing & Development
Running Tests
Code Quality
Manual Testing
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details on:
- Development setup
- Coding standards
- Testing requirements
- Pull request process
๐ Security
If you discover a security vulnerability, please review our Security Policy for responsible disclosure guidelines.
๐ Support
If you find this package helpful, consider:
- โญ Starring the repository
- ๐ Supporting development
- ๐ Reporting issues
- ๐ค Contributing improvements
๐ License
MIT License
All versions of sitemapper with dependencies
psr/http-factory Version ^1.1
psr/http-message Version ^2.0
psr/simple-cache Version ^3.0