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)2049.5k↓55.6%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 3mo 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 yesterday

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 91% of packages

Maintenance55

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity54

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

641d 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

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[showdoc/showdoc

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

12.8k7.1k](/packages/showdoc-showdoc)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[pagemachine/searchable

TYPO3 extension to index and search content with Elasticsearch

1039.9k](/packages/pagemachine-searchable)[b13/assetcollector

Asset collector - Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10125.6k](/packages/b13-assetcollector)

PHPackages © 2026

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