PHPackages                             graze/silex-trailing-slash-handler - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. graze/silex-trailing-slash-handler

ActiveLibrary[HTTP &amp; Networking](/categories/http)

graze/silex-trailing-slash-handler
==================================

Handle requests missing a trailing slash in Silex by appending a slash and issuing an internal sub-request.

v2.0.1(6y ago)521.6k2[1 PRs](https://github.com/graze/silex-trailing-slash-handler/pulls)MITPHPCI failing

Since Nov 27Pushed 4y ago10 watchersCompare

[ Source](https://github.com/graze/silex-trailing-slash-handler)[ Packagist](https://packagist.org/packages/graze/silex-trailing-slash-handler)[ RSS](/packages/graze-silex-trailing-slash-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (7)Used By (0)

graze/silex-trailing-slash-handler
==================================

[](#grazesilex-trailing-slash-handler)

[![Build Status](https://camo.githubusercontent.com/004b4060ebb48688e2b20fd29c7c9753cfc33968a9cd7ea8950c8c5fa6962f48/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6772617a652f73696c65782d747261696c696e672d736c6173682d68616e646c65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/graze/silex-trailing-slash-handler)[![Coverage Status](https://camo.githubusercontent.com/8cf592954b7de7cdea3a2d41292427d345daa1e782c1d91682bc0b3310e2970d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6772617a652f73696c65782d747261696c696e672d736c6173682d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/silex-trailing-slash-handler/code-structure)[![Quality Score](https://camo.githubusercontent.com/16405637ab8d3ad1d3c8d1a62728d0fb0d5d0f2e6b41800e8b236dfe6c7f40e9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6772617a652f73696c65782d747261696c696e672d736c6173682d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/silex-trailing-slash-handler)[![Latest Version](https://camo.githubusercontent.com/fb9c36ef720d3a3d6b33c94b46c1d801fe9d1c23d5f7e7b6774f530eed6f442c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f73696c65782d747261696c696e672d736c6173682d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/silex-trailing-slash-handler)[![PHP ~5.5](https://camo.githubusercontent.com/dfa2586d8a08257ade7ab51f690a5bbab1ce0addb200cb68840dc5d745c63711/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e362d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://secure.php.net)[![MIT Licensed](https://camo.githubusercontent.com/75d136a12f8319f740d67e7c833c130e0aa5bd45f52557d2f24224f510613562/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6772617a652f73696c65782d747261696c696e672d736c6173682d68616e646c65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/graze/silex-trailing-slash-handler/blob/master/LICENSE)

Handle requests missing a trailing slash in Silex by appending a slash and issuing an internal sub-request.

See [silexphp/Silex #149](https://github.com/silexphp/Silex/issues/149) for more information about the default Silex routing behavior.

Installation
------------

[](#installation)

We try to support all commonly used versions of Silex including:

- [Silex 2](https://github.com/silexphp/Silex) on [`master`](https://github.com/graze/silex-trailing-slash-handler/tree/master) branch, `^2.0` releases

    ```
    ~$ composer require graze/silex-trailing-slash-handler
    ```
- [Silex 1.3](https://github.com/silexphp/Silex/tree/1.3) on [`1.x`](https://github.com/graze/silex-trailing-slash-handler/tree/1.x) branch, `^1.0` releases

    ```
    ~$ composer require graze/silex-trailing-slash-handler:^1.0
    ```

Usage
-----

[](#usage)

```
$app->get('/', function () {
    return 'Hello World!';
})

$provider = new \Graze\Silex\ControllerProvider\TrailingSlashControllerProvider();

$app->register($provider);
$app->mount('/', $provider);
```

ℹ️ Define all your routes first before mounting the controller provider if you want routes with no trailing slash to be matched.

License
-------

[](#license)

The content of this library is released under the **MIT License** by **Nature Delivered Ltd.**

You can find a copy of this license in [`LICENSE`](https://github.com/graze/silex-trailing-slash-handler/blob/master/LICENSE) or at .

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 64.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 ~366 days

Total

5

Last Release

2349d ago

Major Versions

v0.1.0 → 1.x-dev2017-09-25

v1.0.0 → v2.0.02017-09-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/637788?v=4)[graze.com](/maintainers/graze)[@graze](https://github.com/graze)

---

Top Contributors

[![sjparkinson](https://avatars.githubusercontent.com/u/51677?v=4)](https://github.com/sjparkinson "sjparkinson (9 commits)")[![biggianteye](https://avatars.githubusercontent.com/u/1482649?v=4)](https://github.com/biggianteye "biggianteye (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (1 commits)")[![iamstuartwilson](https://avatars.githubusercontent.com/u/3594817?v=4)](https://github.com/iamstuartwilson "iamstuartwilson (1 commits)")

---

Tags

silex

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/graze-silex-trailing-slash-handler/health.svg)

```
[![Health](https://phpackages.com/badges/graze-silex-trailing-slash-handler/health.svg)](https://phpackages.com/packages/graze-silex-trailing-slash-handler)
```

###  Alternatives

[illuminate/http

The Illuminate Http package.

11936.0M5.0k](/packages/illuminate-http)[jdesrosiers/silex-cors-provider

A silex service provider that adds CORS services to silex

83892.3k10](/packages/jdesrosiers-silex-cors-provider)[eole/sandstone

Silex RestApi with Websockets.

1115.2k1](/packages/eole-sandstone)

PHPackages © 2026

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