webalternatif / flysystem-composite
A simple interface for composite Flysystem adapters
Installs: 1 533
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: 8.0.* || 8.1.* || 8.2.* || 8.3.*
- league/flysystem: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- vimeo/psalm: ^5.18
README
A simple interface for composite Flysystem adapters.
Installation
$ composer require webalternatif/flysystem-composite
Usage
use Webf\Flysystem\Composite\CompositeFilesystemAdapter; /** * @template T of FilesystemAdapter * @template-implements CompositeFilesystemAdapter<T> */ class MyWrapperAdapter implements CompositeFilesystemAdapter { /** * @param T $innerAdapter */ public function __construct(private FilesystemAdapter $innerAdapter) { } public function getInnerAdapters() : iterable { return [$this->innerAdapter]; } // ... (implementation of FilesystemAdapter's methods) }
Tests
To run all tests, execute the command:
$ composer test
This will run Psalm and a PHP-CS-Fixer check, but you can run them individually like this:
$ composer psalm $ composer cs-check