imbo/imbo-b2-adapters

B2 adapters for Imbo

dev-main 2023-04-09 09:32 UTC

This package is auto-updated.

Last update: 2024-10-20 00:21:17 UTC


README

CI

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.