Download the PHP package wikimedia/services without Composer
On this page you can find all versions of the php package wikimedia/services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wikimedia/services
More information about wikimedia/services
Files in wikimedia/services
Package services
Short Description Generic service to manage named services using lazy instantiation based on instantiator callback functions
License GPL-2.0-or-later
Homepage https://www.mediawiki.org/wiki/Services_(PHP_library)
Informations about the package services
Services
A PSR-11-compliant services framework. Services are created by instantiators (callables), which are usually defined in separate wiring files.
Usage
Where ServiceWiring.php
looks like this:
Each instantiator receives the service container as the first argument,
from which it may retrieve further services as needed.
Additional arguments for each instantiator may be specified
when constructing the ServiceContainer
.
Custom subclasses of ServiceContainer
may offer easier access to certain services:
Running tests
composer install --prefer-dist
composer test
History
This library was first introduced in MediaWiki 1.27 (I3c25c0ac17). It was split out of the MediaWiki codebase and published as an independent library during the MediaWiki 1.33 and MediaWiki 1.34 development cycles.
All versions of services with dependencies
psr/container Version ^1.1 || ^2.0
wikimedia/scoped-callback Version ^3.0 || ^4.0 || ^5.0