imbo / imbo-b2-adapters
B2 adapters for Imbo
dev-main
2023-04-09 09:32 UTC
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- imbo/imbo: dev-main
- imbo/imbo-adapters-sdk: dev-main
- imbo/imbo-coding-standard: ^2.0
- phpunit/phpunit: ^10.0
- psalm/plugin-phpunit: ^0.18.4
- vimeo/psalm: ^5.5
This package is auto-updated.
Last update: 2024-11-20 00:28:18 UTC
README
B2 storage adapter for Imbo.
Installation
composer require imbo/imbo-b2-adapters
Usage
Create the adapter using a key ID, an application key, a bucket ID, and a bucket name. You can get access to this information in your B2 account.
use Imbo\Storage\B2; $adapter = new B2($keyId, $applicationKey, $bucketId, $bucketName);
Running integration tests
If you want to run the integration tests for this adapter you need to export the following environment variables:
B2_KEY_ID
B2_APPLICATION_KEY
B2_BUCKET_ID
B2_BUCKET_NAME
You will also need to copy phpunit.xml.dist
to phpunit.xml
and comment out or remove the part in the configuration that excludes the integration test group.
Warning: The integration tests will empty the specified bucket, so if you intend to run the integration tests you should create a dedicated bucket for this purpose.
License
MIT, see LICENSE.