PHPackages                             bnf/typo3-middleware - 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. bnf/typo3-middleware

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

bnf/typo3-middleware
====================

PSR-7/PSR-15 compatible middleware for TYPO3

0.3.1(6y ago)43.6kGPL-2.0+PHPPHP ^7.0

Since Aug 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bnf/typo3-middleware)[ Packagist](https://packagist.org/packages/bnf/typo3-middleware)[ RSS](/packages/bnf-typo3-middleware/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (9)Used By (0)

TYPO3 Middleware
================

[](#typo3-middleware)

ExtbaseMiddleware
-----------------

[](#extbasemiddleware)

Middleware that prepares an extbase environment – by design without `$GLOBALS['TSFE']`. If you need `$GLOBALS['TSFE']` have a look at the `TypoScriptRenderingMiddleware`.

```
composer require bnf/typo3-middleware bnf/slim-typo3
```

ext\_localconf.php:

```
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Bnf\SlimTypo3\AppRegistry::class)
    ->push(function($app) {
        $pimple = $app->getContainer()->get('pimple');

        $pimple['objectManager'] = function ($c) {
            return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
        };
        $pimple['whateverRepository'] = function ($c) {
            return $c['objectManager']->get(\Vendor\Extension\Domain\Repository\WhateverRepository::class);
        };
        $pimple['exportService'] = function ($c) {
            return $c['objectManager']->get(\Vendor\Extension\Service\ExportService::class);
        };

        $app->get('/export-whatever[/]', function ($request, $response) {
            $objects = $this->get('whateverRepository')->findAll();
            $xml = $this->get('exportService')->whateverToXml($objects);
            $response->getBody()->write($xml->saveXML());

            return $response;
        })->add(new \Bnf\Typo3Middleware\ExtbaseMiddleware([
            'persistence' => [
                'storagePid' => 78,
		/* TypoScript is not evaluated (by design), you need to provide _all_
                 * required persistence configuration here. Include stuff here that you
                 * or your dependencies write into config.extbase.persistence */
                // 'classes' => [ \Vendor\Whathever\Domain\Model\Whatever::class => [ 'mapping' => [ 'tableName' => 'custom_table' ] ] ],
            ],
            /* You can provide plugin context here (will be used in the mocked UriBuilder) */
            //'extensionName' => 'Whatever',
            //'pluginName' => 'Pi1',
            //'vendorName' => 'Vendor',
        ]));
```

TypoScriptRenderingMiddleware
-----------------------------

[](#typoscriptrenderingmiddleware)

```
composer require bnf/typo3-middleware bnf/slim-typo3 helhum/typoscript-rendering
```

ext\_localconf.php:

```
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Bnf\SlimTypo3\AppRegistry::class)
    ->push(function($app) {
        /* Simple Example, no (content element) context, only call extbase plugin */
        $app->get('/some-extbase-api', function ($request, $response) {
            $handler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Bnf\Typo3Middleware\TypoScriptRenderingMiddleware::class, [
                'signature' => 'extensionname_pluginname',
            ]);

            return $handler->process($request);
        });

        /* Execute the same plugin as above (now specified using 'extension' and 'plugin')
         * in the context of page '213' and with flexform settings from tt_content record '3284'.
         * Also (optionally) pass the argument 'foo' to the extbase controller.
         */
        $app->get('/some-custom-extbase-action[/{foo}]', function ($request, $response, $args) {
            $handler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Bnf\Typo3Middleware\TypoScriptRenderingMiddleware::class, [
                'extension' => 'VendorName.ExtensionName',
                'plugin' => 'PluginName',
                'page' => '213',
                'record' => 'tt_content_3284',
                'arguments' => [
                    'foo' => $args['foo'] ?? null,
                ],
                'page' => '649',
            ]);

            /* Add a custom header to the request, that's returned by extbase/TYPO3 core */
            return $handler->process($request)->withHeader('Content-Type', 'application/xml');
        });
    });
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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 ~121 days

Recently: every ~80 days

Total

7

Last Release

2454d ago

Major Versions

0.3.1 → v10.x-dev2019-08-20

PHP version history (2 changes)0.1.0PHP &gt;=7.0.0

0.2.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8b7c224af04cc109194abd9d592618e75e05ec95ad86f2e4381b4bd110f99bd?d=identicon)[bnf](/maintainers/bnf)

---

Top Contributors

[![bnf](https://avatars.githubusercontent.com/u/473155?v=4)](https://github.com/bnf "bnf (15 commits)")

---

Tags

psr-7http-messagemiddlewaretypo3

### Embed Badge

![Health badge](/badges/bnf-typo3-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/bnf-typo3-middleware/health.svg)](https://phpackages.com/packages/bnf-typo3-middleware)
```

###  Alternatives

[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[tuupola/slim-basic-auth

PSR-7 and PSR-15 HTTP Basic Authentication Middleware

4442.0M25](/packages/tuupola-slim-basic-auth)[relay/relay

A PSR-15 server request handler.

3302.1M85](/packages/relay-relay)[tuupola/cors-middleware

PSR-7 and PSR-15 CORS middleware

1331.8M24](/packages/tuupola-cors-middleware)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

586.6M81](/packages/laminas-laminas-stratigility)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)

PHPackages © 2026

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