imbo / imbo-s3-adapters
AWS S3 adapters for Imbo
dev-main
2025-04-23 15:21 UTC
Requires
- php: >=8.3
- aws/aws-sdk-php: ^3.342
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- imbo/imbo: dev-main
- imbo/imbo-adapters-sdk: dev-main
- imbo/imbo-coding-standard: dev-main
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^12.1
- symfony/var-dumper: ^7.2
This package is auto-updated.
Last update: 2025-04-23 15:23:11 UTC
README
AWS S3 storage adapters for Imbo.
Installation
composer require imbo/imbo-s3-adapters
Usage
This package provides two storage adapters for Imbo. One for the main images, and one for image variations.
use Imbo\Storage\S3 as MainStorage; use Imbo\EventListener\ImageVariations\Storage\S3 as ImageVariationStorage; $mainAdapter = new MainStorage($keyId, $applicationKey, $bucketId, $bucketName); $imageVariationAdapter = new ImageVariationStorage($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:
S3_KEY
S3_SECRET
S3_BUCKET
S3_REGION
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.