Download the PHP package tbachert/spi without Composer
On this page you can find all versions of the php package tbachert/spi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package spi
Short Description Service provider loading facility
License Apache-2.0
Informations about the package spi
Service Provider Interface
Service provider loading facility, inspired by Javas ServiceLoader
.
Install
Usage
Registering service providers
Service provider implementations must provide a public zero-arguments constructor.
Registering via composer.json extra.spi
Registering via php
Converting ServiceLoader::register()
calls to precompiled map
ServiceLoader::register()
calls can be converted to a precompiled map by setting extra.spi-config.autoload-files
to
true
to process allautoload.files
(should be used iffautoload.files
is used exclusively for service provider registration),- or a list of files that register service providers.
Removing obsolete entries from autoload.files
By default, extra.spi-config.autoload-files
files that register service providers are removed from
autoload.files
. This behavior can be configured by setting extra.spi-config.prune-autoload-files
to
true
to remove allexra.spi-config.autoload-files
files fromautoload.files
,false
to keep allautoload.files
entries,- or a list of files that should be removed from
autoload.files
.
Application authors
Make sure to allow the composer plugin to be able to load service providers.
Loading service providers
Handling invalid service configurations
All versions of spi with dependencies
composer-plugin-api Version ^2.0
composer/semver Version ^1.0 || ^2.0 || ^3.0