Download the PHP package phil/sitemap-bundle without Composer
On this page you can find all versions of the php package phil/sitemap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phil/sitemap-bundle
More information about phil/sitemap-bundle
Files in phil/sitemap-bundle
Package sitemap-bundle
Short Description phil/sitemap in Symfony: the sitemap option of routes, URL providers and a populate event, served as /sitemap.xml or dumped as files
License MIT
Homepage https://ph-il.ca
Informations about the package sitemap-bundle
phil/sitemap-bundle
/sitemap.xml for a Symfony site, from route options, URL providers and an event.
phil/sitemap-bundle brings phil/sitemap into a Symfony application. Three sources make the pages: the routes that
carry a sitemap option, every service that implements UrlProvider, and the listeners of the PopulateSitemap
event. A localized route gives one page per locale, each with the others as alternates. The bundle serves the index
at /sitemap.xml and each file at /sitemap.{name}.xml, or writes them as files with phil:sitemap:dump, gzipped
with --gzip and under another base URL with --base-url. A bad route option fails at once, as an
InvalidRouteOption naming the route.
Use it in a Symfony site that wants its fixed routes and its database pages in one sitemap. A small site serves it on
request. A large one dumps it once a release is deployed, since building the index asks every provider for every
page. An application coming from PrestaSitemapBundle keeps the same route option, and finds its configuration keys
under phil_sitemap. Outside Symfony, phil/sitemap writes the XML on its own.
It plugs into the Symfony router, the event dispatcher, the console and the clock. Providers are autoconfigured, so a
class that implements UrlProvider is enough. The bundle gathers the pages, and the library checks and writes them.
Status
| Part | State |
|---|---|
The sitemap route option, with defaults and a default section, localized routes as alternates |
Implemented and tested |
Providers, autoconfigured, and the PopulateSitemap event |
Implemented and tested |
/sitemap.xml and /sitemap.{name}.xml |
Implemented and tested |
phil:sitemap:dump, with --gzip and --base-url |
Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, registering, the routes. |
| Configuration | Sections, defaults, files, the dump directory. |
| Pages | The route option, providers and the populate event. |
| Serving and dumping | The served sitemap and the files the dump writes. |
| Coming from PrestaSitemapBundle | What each part of that bundle becomes. |
| Extension points | What an application implements, configures, replaces or relies on. |
| Testing | How the bundle is tested. |
| Reference | Every type and service of the bundle. |
Quick start
Requirements
PHP 8.5 or later with zlib, Symfony 8.2 or later, and phil/sitemap.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.
All versions of sitemap-bundle with dependencies
ext-zlib Version *
phil/sitemap Version ^0.1.1@dev
psr/clock Version ^1.0
psr/event-dispatcher Version ^1.0
symfony/clock Version ^8.2
symfony/config Version ^8.2
symfony/console Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/http-foundation Version ^8.2
symfony/http-kernel Version ^8.2
symfony/routing Version ^8.2