PHPackages                             tm/silex-sitemap-service-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tm/silex-sitemap-service-provider

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

tm/silex-sitemap-service-provider
=================================

Simple service provider to generate a xml-sitemap.

4.0.0(9y ago)413.4k4[1 PRs](https://github.com/tommy-muehle/silex-sitemap-service-provider/pulls)MITPHPPHP &gt;=5.6.0

Since Dec 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tommy-muehle/silex-sitemap-service-provider)[ Packagist](https://packagist.org/packages/tm/silex-sitemap-service-provider)[ RSS](/packages/tm-silex-sitemap-service-provider/feed)WikiDiscussions release/4.x.x Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (8)Used By (0)

silex-sitemap-service-provider
==============================

[](#silex-sitemap-service-provider)

[![Build Status](https://camo.githubusercontent.com/282a9983abda40c9224d9b8d791060225f84e1551acffe48e7eadf4a8ab4d275/68747470733a2f2f7472617669732d63692e6f72672f746f6d6d792d6d7565686c652f73696c65782d736974656d61702d736572766963652d70726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tommy-muehle/silex-sitemap-service-provider)[![Latest Stable Version](https://camo.githubusercontent.com/35f94d3ab517bc240eda2f2dd674cc007a429cfc81286ddc8c4ab5732dfd2214/68747470733a2f2f706f7365722e707567782e6f72672f746d2f73696c65782d736974656d61702d736572766963652d70726f76696465722f762f737461626c65)](https://packagist.org/packages/tm/silex-sitemap-service-provider)[![License](https://camo.githubusercontent.com/7a335d7de9d12fcfa5d5f39da534f81591f1b84bf0dee9dff47fbc1e1b318b41/68747470733a2f2f706f7365722e707567782e6f72672f746d2f73696c65782d736974656d61702d736572766963652d70726f76696465722f6c6963656e7365)](https://packagist.org/packages/tm/silex-sitemap-service-provider)[![Issues](https://camo.githubusercontent.com/c6a8b2aa6cd67cc1012922744bbbe8fcd14d8204863087811c6d770a174008ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f746f6d6d792d6d7565686c652f73696c65782d736974656d61702d736572766963652d70726f76696465722e737667)](https://github.com/tommy-muehle/silex-sitemap-service-provider/issues)[![Total Downloads](https://camo.githubusercontent.com/b725b750022671b9bb2f7d13b7a2b73a03791c5038be121be99e18dbf7e99376/68747470733a2f2f706f7365722e707567782e6f72672f746d2f73696c65782d736974656d61702d736572766963652d70726f76696465722f646f776e6c6f616473)](https://packagist.org/packages/tm/silex-sitemap-service-provider)

The provider supports both major Versions of [Silex](http://silex.sensiolabs.org/).

### Installation

[](#installation)

For applications based on Silex &gt;= 2.0.0:

```
composer require tm/silex-sitemap-service-provider ^4.0

```

If you use Silex 1.3.x or lower in your application:

```
composer require tm/silex-sitemap-service-provider ^3.0

```

### Example Basic Usage

[](#example-basic-usage)

First you have to register the ServiceProvider:

```
    $app->register(new TM\Provider\SitemapServiceProvider());
```

Optional you can also set some options for the generator:

```
    $app->register(new TM\Provider\SitemapServiceProvider(), [
        'sitemap.options' => [
            'charset' => 'ISO-8859-1',
            'version' => '1.0',
            'scheme' => 'http://www.sitemaps.org/schemas/sitemap/0.8'
        ]
    ]);
```

Then implement the route for the sitemap.xml with your custom logic:

```
    $app->get('sitemap.xml', function () use ($app) {

      $host = $app['request']->getSchemeAndHttpHost();

      $sitemap = $app['sitemap'];
      $sitemap->addEntry($host . '/', 1, 'yearly');

      $entities = $app['repository.entity']->findAll(50000);

      foreach ($entities as $entity) {
        $entityLoc = $app['url_generator']->generate('entity', array('entity' => $entity->getId()));
        $sitemap->addEntry($host . $entityLoc, 0.8, 'monthly', $entity->getLastModified());
      }

      return $sitemap->generate();
    })
    ->bind('sitemap');
```

### Contributing

[](#contributing)

Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute.

### Development

[](#development)

Run tests with the following command in the project directory.

```
composer install
./vendor/bin/behat

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~158 days

Recently: every ~103 days

Total

6

Last Release

3372d ago

Major Versions

1.1.1 → 2.0.02016-06-01

2.0.0 → 3.0.02016-10-10

3.0.0 → 4.0.02017-02-23

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

3.0.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/618c748bc15b0e91e6280fcf687e28c1afaeb36335d634372d85f7eba3f0cf4f?d=identicon)[tommymuehle](/maintainers/tommymuehle)

---

Top Contributors

[![tommy-muehle](https://avatars.githubusercontent.com/u/1351840?v=4)](https://github.com/tommy-muehle "tommy-muehle (33 commits)")[![sebastian-marinescu](https://avatars.githubusercontent.com/u/3798871?v=4)](https://github.com/sebastian-marinescu "sebastian-marinescu (2 commits)")

---

Tags

phpsilexsilex-providersitemapxmlsilexSitemap

### Embed Badge

![Health badge](/badges/tm-silex-sitemap-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/tm-silex-sitemap-service-provider/health.svg)](https://phpackages.com/packages/tm-silex-sitemap-service-provider)
```

###  Alternatives

[presta/sitemap-bundle

A Symfony bundle that provides tools to build your application sitemap.

3929.4M28](/packages/presta-sitemap-bundle)[rumenx/php-sitemap

Framework-agnostic Sitemap generator for PHP, Laravel, and Symfony.

1.3k15.1k1](/packages/rumenx-php-sitemap)[vipnytt/sitemapparser

XML Sitemap parser class compliant with the Sitemaps.org protocol.

772.2M10](/packages/vipnytt-sitemapparser)[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.2k1](/packages/m1-vars)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[demi/sitemap-generator

Yii2 component for generate sitemap.xml files.

1427.0k](/packages/demi-sitemap-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
