thecodingmachine / slim-universal-module
Cross-framework module for slim framework
Requires
- php: >=7.0
- container-interop/service-provider: ~0.3.0
- slim/slim: ^3.0
- thecodingmachine/middleware-list-universal-module: ~1.0
Requires (Dev)
- mnapoli/simplex: ~0.2.0
- phpunit/phpunit: ^5.0
- puli/cli: ^1.0
- puli/composer-plugin: ^1.0
- satooshi/php-coveralls: ^1.0
This package is auto-updated.
Last update: 2024-12-07 00:16:23 UTC
README
Slim framework universal module
This package integrates the Slim framework (v3) in any container-interop/service-provider compatible framework/container.
Installation
composer require thecodingmachine/slim-universal-module
Once installed, you need to register the TheCodingMachine\SlimServiceProvider
into your container.
If your container supports Puli integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.
Introduction
This service provider is meant to create a base Slim/App
instance.
You can later play with this instance to add routes, etc...
Expected values / services
This service provider expects the following configuration / services to be available:
Provided services
Note: Sadly, Slim uses containers as service locators instead of dependency injection containers. This means that the name of the instances is dictated by Slim. The names could collide with some of your services! Be wary of this!
This service provider provides the following services:
Extended services
This service provider registers the Slim\App
in the MiddlewareListServiceProvider::MIDDLEWARES_QUEUE
.