kinetis / storage-s3
Fiber-native non-blocking S3 (and S3-compatible) file storage for Kinetis, plugging into kinetis/storage's FILESYSTEM_DRIVER=s3.
Requires
- php: ^8.4
- async-aws/s3: ^3.4.1
- kinetis/framework: ^1.2.5
- kinetis/revolt-http-client: ^1.1.2
- kinetis/storage: ^1.1.2
- league/flysystem: ^3.35.2
- league/flysystem-async-aws-s3: ^3.31.0
Requires (Dev)
- infection/infection: ^0.35.0
- phpstan/phpstan: ^2.2.8
- phpunit/phpunit: ^12.5.33
- vimeo/psalm: ^6.16.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
kinetis/storage-s3
S3 (and S3-compatible) file storage for Kinetis, plugging into kinetis/storage's FILESYSTEM_DRIVER=s3
Part of Kinetis, a non-blocking PHP framework for API-first applications, developed in the kinetis-dev/kinetis monorepo.
The same League\Flysystem\FilesystemOperator interface kinetis/storage
gives local disk, backed by AsyncAws\S3\S3Client and
League\Flysystem\AsyncAwsS3\AsyncAwsS3Adapter instead — genuinely
non-blocking, via kinetis/revolt-http-client's Revolt-native HTTP
transport injected into S3Client, not the SDK's default blocking one.
use Kinetis\Storage\FilesystemFactory; $storage = FilesystemFactory::fromConfig($config); // FILESYSTEM_DRIVER=s3 $storage->write('avatars/user-42.png', $imageContents); $contents = $storage->read('avatars/user-42.png'); $storage->delete('avatars/user-42.png');
Configuration
FILESYSTEM_DRIVER=s3
FILESYSTEM_S3_BUCKET=my-app-bucket
FILESYSTEM_S3_REGION=us-east-1
| Key | Default | Purpose |
|---|---|---|
FILESYSTEM_S3_BUCKET |
(required) | Bucket name. |
FILESYSTEM_S3_REGION |
(required) | AWS region. |
FILESYSTEM_S3_PREFIX |
— | Key prefix. |
FILESYSTEM_S3_ENDPOINT |
— | S3-compatible endpoint instead of real AWS (e.g. MinIO). |
FILESYSTEM_S3_PATH_STYLE |
false |
Path-style addressing — true for MinIO and most other non-AWS S3-compatible services. |
Every key is scoped — FILESYSTEM_S3_BUCKET + backups →
FILESYSTEM_BACKUPS_S3_BUCKET. Full reference:
kinetis.dev/docs/config.html.
Credentials are never read from Kinetis config — AsyncAws\Core\Configuration
resolves them on its own, from AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY
or an IAM role, the standard AWS SDK convention.
Installation
composer require kinetis/storage-s3
Requires PHP 8.4+, kinetis/framework,
kinetis/storage, and
kinetis/revolt-http-client.
Full documentation:
kinetis.dev/docs/storage-s3.html.
License
MIT — see LICENSE.