PHPackages                             b13/slimphp-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. [API Development](/categories/api)
4. /
5. b13/slimphp-bridge

ActiveTypo3-cms-extension[API Development](/categories/api)

b13/slimphp-bridge
==================

Provides a middleware for registering Slim PHP applications within TYPO3 Frontend Sites

0.6.2(1y ago)2047.2k↓16.3%5[4 issues](https://github.com/b13/slimphp-bridge/issues)[2 PRs](https://github.com/b13/slimphp-bridge/pulls)1GPL-2.0-or-laterPHP

Since Feb 15Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/b13/slimphp-bridge)[ Packagist](https://packagist.org/packages/b13/slimphp-bridge)[ Docs](https://github.com/b13/slimphp-bridge)[ RSS](/packages/b13-slimphp-bridge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (12)Used By (1)

SlimPHP - TYPO3 Bridge Extension
================================

[](#slimphp---typo3-bridge-extension)

Boot up a SlimPHP application within a PSR-15 middleware of the TYPO3 Frontend Request.

There are two things you need for this:

1. Create your endpoints with a SlimPHP `RequestResponseArgs` strategy in PHP
2. Configure your endpoints in your site configuration file

Clear caches and you should be good to go.

Description
-----------

[](#description)

TYPO3 v9 offers a flexible way to hook into the Frontend Rendering process and do something completely different - thanks to PSR-7 and PSR-15.

SlimPHP is also based on the PSR standards and is a perfect fit if a TYPO3 developer needs to integrate a proper API via e.g. REST.

This small wrapper extension helps to get going very quickly when needing a small API layer for arbitrary endpoints. It is not meant to become a fully headless solution for TYPO3 as a CMS.

However, a TYPO3 PHP developer should be familiar with starting off really quickly to handle custom endpoints without having to write TypoScript.

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

[](#installation)

Install it via `composer req b13/slimphp-bridge` (currently composer-only as some PHP dependencies are needed).

Activate the extension in the backend of TYPO3.

Configuration
-------------

[](#configuration)

Then adapt your site configuration to add custom routes.

The `type: slim` entry enables a SlimPHP Application. The current Site object is then available in the request object.

```
routes:
  - route: '/api'
    type: 'slim'
    # add middlewares for the whole application. Convenient for any error handling or adding Preflight checks (OPTIONS)
    middlewares:
      - 'B13\MyExtension\Middleware\PreflightCheck'
    groups:
    - route: '/v1'
      middlewares:
        # enable this if you don't manage your languages via the URL endpoint + the base site handling.
        - 'B13\SlimPhp\Middleware\PreferredClientLanguageSelector'
        # enable this if you need extbase in your custom setup
        - 'B13\SlimPhp\Middleware\ExtbaseBridge'
      routes:
        # load a file
        - methods: [any]
          route: '/schema.json'
          file: 'EXT:myextension/Resources/Private/Api/schema_v1.json'
          contentType: 'application/json'
        - methods: [get]
          route: '/article'
          callback: B13\MyExtension\Controller\LoadArticlesController
        - methods: [get]
          route: '/customer'
          callback: B13\MyExtension\Controller\CustomerController:fetchAll
          middlewares: [B13\MyExtension\Middleware\JwtAuthentication]
        - methods: [get]
          route: '/customer/{id}'
          callback: B13\MyExtension\Controller\Api\CustomerController:fetch
          middlewares: [B13\MyExtension\Middleware\JwtAuthentication]
        - methods: [put]
          route: '/customer/{id}'
          callback: B13\MyExtension\Controller\Api\CustomerController:update
          middlewares: [B13\MyExtension\Middleware\JwtAuthentication]
```

The configuration is similar to what you can do with SlimPHP and with TYPO3, and your controllers just follow the `RequestResponseArgs` strategy pattern in SlimPHP.

Once you create your endpoints (callbacks), clear your caches and you can run your installation directly.

**TYPO3 10.4**: If you wan't to use DI in your callbacks, you will have to make them public in the DI configuration:

```
services:
  B13\MyExtension\Controller\Api\CustomerController:
    public: true
```

Currently, the extension ships with Tobias Nyholm's PSR implementation, as this provides proper PSR-17 factories.

### Caveats

[](#caveats)

Every time you change your configuration, ensure to clear the TYPO3 core caches.

ToDo
----

[](#todo)

- More documentation to get started and define all options available
- More Tests
- More flexibility with the routing parameters
- Proper error handling

License
-------

[](#license)

As TYPO3 Core, this extension is licensed under GPL2 or later. See the LICENSE file for more details.

Authors &amp; Maintenance
-------------------------

[](#authors--maintenance)

This extension was initially created for a customer project by Benni Mack for [b13, Stuttgart](https://b13.com).

[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance60

Regular maintenance activity

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.1% 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 ~169 days

Recently: every ~150 days

Total

11

Last Release

595d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/165630?v=4)[Benni Mack](/maintainers/bmack)[@bmack](https://github.com/bmack)

---

Top Contributors

[![bmack](https://avatars.githubusercontent.com/u/165630?v=4)](https://github.com/bmack "bmack (26 commits)")[![dogawaf](https://avatars.githubusercontent.com/u/381969?v=4)](https://github.com/dogawaf "dogawaf (7 commits)")[![spoonerWeb](https://avatars.githubusercontent.com/u/1793083?v=4)](https://github.com/spoonerWeb "spoonerWeb (6 commits)")[![davidsteeb](https://avatars.githubusercontent.com/u/3862523?v=4)](https://github.com/davidsteeb "davidsteeb (5 commits)")[![S3b0](https://avatars.githubusercontent.com/u/1212180?v=4)](https://github.com/S3b0 "S3b0 (3 commits)")[![thomashempel](https://avatars.githubusercontent.com/u/354084?v=4)](https://github.com/thomashempel "thomashempel (2 commits)")

---

Tags

apipsr-15slimphptypo3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/b13-slimphp-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/b13-slimphp-bridge/health.svg)](https://phpackages.com/packages/b13-slimphp-bridge)
```

###  Alternatives

[showdoc/showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online

12.8k7.0k](/packages/showdoc-showdoc)[leuchtfeuer/secure-downloads

"Secure Download": Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct access.

22234.7k1](/packages/leuchtfeuer-secure-downloads)[friendsoftypo3/interest

REST and CLI API for adding, updating, and deleting records in TYPO3. Tracks relations so records can be inserted in any order. Uses remote ID mapping so you don't have to keep track of what UID a record has gotten after import. Data is inserted using backend APIs as if a real human did it, so you can can inspect the record history and undo actions.

111.3k1](/packages/friendsoftypo3-interest)

PHPackages © 2026

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