PHPackages                             buzzingpixel/craft-slim-bridge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. buzzingpixel/craft-slim-bridge

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

buzzingpixel/craft-slim-bridge
==============================

Bridge for using Slim with Craft

1.1.5(2y ago)0268Apache-2.0PHPPHP ^8.0

Since Sep 28Pushed 2y agoCompare

[ Source](https://github.com/buzzingpixel/craft-slim-bridge)[ Packagist](https://packagist.org/packages/buzzingpixel/craft-slim-bridge)[ RSS](/packages/buzzingpixel-craft-slim-bridge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (13)Versions (8)Used By (0)

Slim Bridge for Craft CMS
=========================

[](#slim-bridge-for-craft-cms)

This is probably only of interest to me, but you're welcome to use this project if you come across it and like it.

I really like working in [Slim](https://www.slimframework.com), with [FastRoute](https://github.com/nikic/FastRoute), and PSR standard interfaces. To that end, I've created this extremely simple Craft Plugin that let's me do the front-end of Craft sites in Slim and mostly ignore that Craft is there in the background.

Here's how to use it:
---------------------

[](#heres-how-to-use-it)

1. In your craft project, run `composer require buzzingpixel/craft-slim-bridge`
2. Then run `php craft plugin/install slim-bridge`
3. Create a config file in your `/config` directory named `slim-bridge.php`. See [Config](#config) section below for configuration.
4. Add the following catch-all route as the last route in your craft `routes.php` file:
    - `'' => 'slim-bridge/route-handler/index',`
5. For Category or Entry routing through Slim, use the following format in the site settings `template` field to route to custom class's `__invoke` method:
    - `_slimBridge/\My\Custom\Action\Class`
    - If you want to add route middleware or manipulate the route in other ways, implement `\BuzzingPixel\SlimBridge\ElementSetRoute\SetRouteFromParsed\RoutingCallbackContract`

Example:

```
return [
    '/some/craft/route' => 'some-template-or-action',
    '/another/craft/route' => 'another-template-or-action',
    '' => 'slim-bridge/route-handler/index',
];
```

Config
------

[](#config)

Two keys are available in the config file ([See example](examples/slim-bridge.php)):

### `containerInterface`

[](#containerinterface)

Slim requires an implementation of `\Psr\Container\ContainerInterface` and I've left this to project owners to provide. I, personally like [PHP-DI](https://php-di.org).

### `appCreatedCallback`

[](#appcreatedcallback)

This is optional, but if you don't use it, then you won't have set any routes or middlewares and it will be useless to you. Once the app has been created, this callback will be run and the argument recieved will be the Slim App instance which you can use to set routes and middleware.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~147 days

Recently: every ~216 days

Total

7

Last Release

803d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3749c595e494c26b1d9772c64f126c2f64f0d5057736dc5986d2f305432896ba?d=identicon)[buzzingpixel](/maintainers/buzzingpixel)

---

Top Contributors

[![tjdraper](https://avatars.githubusercontent.com/u/3803475?v=4)](https://github.com/tjdraper "tjdraper (46 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/buzzingpixel-craft-slim-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/buzzingpixel-craft-slim-bridge/health.svg)](https://phpackages.com/packages/buzzingpixel-craft-slim-bridge)
```

###  Alternatives

[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233961.5k15](/packages/bryanjhv-slim-session)[docler-labs/codeception-slim-module

Codeception Module for Slim framework.

13178.0k1](/packages/docler-labs-codeception-slim-module)

PHPackages © 2026

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