Download the PHP package b13/slimphp-bridge without Composer

On this page you can find all versions of the php package b13/slimphp-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slimphp-bridge

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

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

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

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.

`

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:

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

Caveats

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

ToDo

License

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

Authors & Maintenance

This extension was initially created for a customer project by Benni Mack for b13, Stuttgart.

Find more TYPO3 extensions we have developed 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.


All versions of slimphp-bridge with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^10.4 || ^11.5 || ^12.4
typo3/cms-frontend Version ^10.4 || ^11.5 || ^12.4
slim/slim Version ^4.1
sapphirecat/slim4-http-interop-adapter Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package b13/slimphp-bridge contains the following files

Loading the files please wait ....