{"id":18929576,"url":"https://github.com/thecodingmachine/splash-service-provider","last_synced_at":"2026-03-16T15:30:16.501Z","repository":{"id":57067899,"uuid":"141339866","full_name":"thecodingmachine/splash-service-provider","owner":"thecodingmachine","description":"Cross-framework module for Splash","archived":false,"fork":false,"pushed_at":"2020-09-03T16:36:51.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-16T12:30:29.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-17T20:25:25.000Z","updated_at":"2020-09-03T16:36:54.000Z","dependencies_parsed_at":"2022-08-24T10:20:14.542Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/splash-service-provider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsplash-service-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsplash-service-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsplash-service-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fsplash-service-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/splash-service-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927825,"owners_count":19719835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:33:43.569Z","updated_at":"2026-03-16T15:30:16.422Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/thecodingmachine/splash-service-provider/v/stable)](https://packagist.org/packages/thecodingmachine/splash-service-provider)\n[![Latest Unstable Version](https://poser.pugx.org/thecodingmachine/splash-service-provider/v/unstable)](https://packagist.org/packages/thecodingmachine/splash-service-provider)\n[![License](https://poser.pugx.org/thecodingmachine/splash-service-provider/license)](https://packagist.org/packages/thecodingmachine/splash-service-provider)\n[![Build Status](https://travis-ci.org/thecodingmachine/splash-service-provider.svg?branch=master)](https://travis-ci.org/thecodingmachine/splash-service-provider)\n[![Coverage Status](https://coveralls.io/repos/thecodingmachine/splash-service-provider/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/thecodingmachine/splash-service-provider?branch=master)\n\n# Splash router universal module\n\nThis package integrates thecodingmachine/splash-router in any [container-interop](https://github.com/container-interop/service-provider) compatible framework/container.\n\n## Installation\n\n```\ncomposer require thecodingmachine/splash-service-provider\n```\n\nOnce installed, you need to register the [`TheCodingMachine\\Splash\\DI\\SplashServiceProvider`](src/SplashServiceProvider.php) into your container.\n\nIf your container supports [thecodingmachine/discovery](https://github.com/thecodingmachine/discovery) integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register *service providers*.\n\n## Introduction\n\nSplash provides a service-provider to be easily integrated in any [container-interop/service-provider](https://github.com/container-interop/service-provider) compatible framework/container.\n\nIf you need a complete working sample, check the [Splash standalone installation guide](https://thecodingmachine.github.io/splash-router/doc/install/standalone.html).\n\nThis service provider will provide a default Splash router.\n \nIt requires an instance of Doctrine's annotation reader to be available.\n\nNote: you can get a service provider providing a Doctrine annotation reader using the following packages:\n \n```\ncomposer require thecodingmachine/doctrine-annotations-universal-module\n```\n\nIt will use a PSR-6 cache if the cache is available.\nNote: you can get a service provider providing a working PSR-6 cache using the following packages:\n \n```\ncomposer require thecodingmachine/stash-universal-module\n```\n\nThis will install Stash and its related service-provider.\n\n## Expected values / services\n\nThis *service provider* expects the following configuration / services to be available:\n\n| Name                        | Compulsory | Description                            |\n|-----------------------------|------------|----------------------------------------|\n| `thecodingmachine.splash.controllers`              | *yes*      | An array of controller name (this is the name of the identifier of the controller in the container) |\n| `thecodingmachine.splash.mode`              | *no*      | The mode of Splash (whether it allows output or not). Can be `SplashUtils::MODE_STRICT` or `SplashUtils::MODE_WEAK` |\n| `Doctrine\\Common\\Annotations\\Reader`  | *yes*       | An instance of Doctrine's annotation reader.  |\n| `CacheItemPoolInterface::class`  | *no*       | The PSR-6 cache pool used to cache the routes  |\n| `LoggerInterface::class`  | *no*       | An optional PSR-3 logger |\n| `thecodingmachine.splash.debug`  | *no*       | If true, Splash will display an error with the 'echoed' output in strict mode. Defaults to true. |\n| `thecodingmachine.splash.root_url` (or `root_url`)  | *no*       | The base URL of the application. Defaults to '/'. |\n\n\n## Provided services\n\nThis *service provider* provides the following services:\n\n| Service name                | Description                          |\n|-----------------------------|--------------------------------------|\n| `TheCodingMachine\\Splash\\Routers\\SplashRouter`              | The Splash PSR-15 Middleware |\n| `thecodingmachine.splash.route-providers`              | A list of \"route providers\" for Splash (an array of `UrlProviderInterface`). Each route provider is in charge of feeding routes to Splash. By default, this array contains an instance of the `ControllerRegistry` that scans routes of the controllers. |\n| `TheCodingMachine\\Splash\\Services\\ControllerRegistry`              | Instance of `ControllerRegistry`.  |\n| `ControllerAnalyzer`              |  |\n| `ParameterFetcherRegistry`              | Registry class referencing all parameter fetchers |\n| `thecodingmachine.splash.parameter-fetchers`              | A list of ParameterFetcher instances |\n| `SplashRequestFetcher`              | An instance of `SplashRequestFetcher` (to autofill the attributes type-hinted on the `ServerRequestInterface`) |\n| `SplashRequestParameterFetcher`              | An instance of `SplashRequestParameterFetcher` (to autofill attributes from the request) |\n| `thecodingmachine.splash.mode`              | Defaults to strict mode |\n\n\n## Extended services\n\nThis *service provider* registers the `SplashDefaultRouter::class` in the `MiddlewareListServiceProvider::MIDDLEWARES_QUEUE`.\n\n| Service name                | Description                          |\n|-----------------------------|--------------------------------------|\n| `MiddlewareListServiceProvider::MIDDLEWARES_QUEUE`  | Adds the Splash middleware to this queue (to be used by external routers)  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fsplash-service-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fsplash-service-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fsplash-service-provider/lists"}