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)2050.5k↓54.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 5mo 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 2w 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

44

—

FairBetter than 90% of packages

Maintenance51

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51% 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

686d 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)")[![balatD](https://avatars.githubusercontent.com/u/38492439?v=4)](https://github.com/balatD "balatD (2 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

103574.3k69](/packages/friendsoftypo3-content-blocks)[pagemachine/typo3-formlog

Form log for TYPO3

23243.0k8](/packages/pagemachine-typo3-formlog)[typo3/cms-fluid-styled-content

TYPO3 CMS Fluid Styled Content - Fluid templates for TYPO3 content elements.

229.7M433](/packages/typo3-cms-fluid-styled-content)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

631.1M8](/packages/netresearch-rte-ckeditor-image)[typo3/cms-seo

TYPO3 CMS SEO - SEO features including specific fields for SEO purposes, rendering of HTML meta tags and sitemaps.

169.1M175](/packages/typo3-cms-seo)[typo3/cms-form

TYPO3 CMS Form - Flexible TYPO3 frontend form framework that comes with a backend editor interface.

147.8M288](/packages/typo3-cms-form)

PHPackages © 2026

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