addshore / psr-6-mediawiki-badostuff-adapter
This package is abandoned and no longer maintained.
The author suggests using the addshore/psr-6-mediawiki-bagostuff-adapter package instead.
A MediaWiki BagOStuff PSR-6 adapter library
Package info
github.com/addshore/psr-6-mediawiki-bagostuff-adapter
pkg:composer/addshore/psr-6-mediawiki-badostuff-adapter
0.2
2026-05-12 09:38 UTC
Requires
- php: ^8.2
- psr/cache: ^3.0
Requires (Dev)
This package is auto-updated.
Last update: 2026-05-12 09:39:34 UTC
README
This library provides a PSR-6 cache pool adapter for MediaWiki's BagOStuff cache backend.
Requirements
- PHP
^8.2 psr/cache:^3.0
Versions
- 0.1: Initial version, compatible with PSR/cache ^1.0.0
- 0.2: Updated to be compatible with PSR/cache ^3.0
Installation
Install with Composer:
composer require addshore/psr-6-mediawiki-bagostuff-adapter
Usage
Wrap a MediaWiki BagOStuff instance with the PSR-6 pool:
use Addshore\Psr\Cache\MWBagOStuffAdapter\BagOStuffPsrCache; use Wikimedia\ObjectCache\BagOStuff; /** @var BagOStuff $bagOStuff */ $pool = new BagOStuffPsrCache( $bagOStuff ); $item = $pool->getItem( 'example-key' ); if ( !$item->isHit() ) { $item->set( 'value' ); $pool->save( $item ); }
Development
Install dependencies:
composer install
Run checks:
composer lint— syntax checks viaparallel-lintcomposer sniff— coding standards viaphpcscomposer phpunit— unit testscomposer test/composer ci— run all checks
Notes
- The historic
cache/integration-testssuite is not currently suitable for PSR/cache 3 in this project context. - This repository therefore uses local PHPUnit tests under
tests/unit.