gecole / storage-s3
S3-compatible storage disk for the Gecole framework, built on the official AWS SDK and shipped as an optional package so the core stays dependency-free.
Requires
- php: >=8.3
- aws/aws-sdk-php: ^3.0
- gecole/framework: dev-main
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-07 19:28:59 UTC
README
An optional S3-compatible storage disk for the Gecole framework. The framework core stays dependency-free; the official AWS SDK handles signing, retries and presigned URLs.
composer require gecole/storage-s3
Enable
Add the provider and define the disk:
// config/app.php
'providers' => [ /* …, */ \Gecole\Storage\S3\S3ServiceProvider::class ],
// config/filesystems.php
'disks' => [
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'bucket' => env('AWS_BUCKET'),
'endpoint' => env('AWS_ENDPOINT', ''),
'use_path_style' => (bool) env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'url' => env('AWS_URL', ''),
'visibility' => env('AWS_VISIBILITY', ''),
],
],
Then use the normal storage API:
storage('s3')->put('avatars/ada.png', $contents);
storage('s3')->get('avatars/ada.png');
$request->file('avatar')->store('avatars', 's3');
Silo / custom endpoints
MinIO’s upstream community distribution has ended; Silo
is the maintained, MinIO-compatible fork used for CI. It keeps the S3 API,
MINIO_* variables and on-disk format.
Set endpoint and use_path_style:
AWS_ENDPOINT=http://127.0.0.1:9000
AWS_USE_PATH_STYLE_ENDPOINT=true
AWS_BUCKET=app
Presigned URLs
$url = app()->storage()->disk('s3')->temporaryUrl('avatars/ada.png', 900);
temporaryUrl() is available on the concrete S3Disk class.
Integration test
The GitLab pipeline runs tests/silo.php against a real Silo service,
including put, get, exists, putFile, presigned URLs and deletion.
Locally:
docker run --rm -p 9000:9000 -p 9001:9001 \
-e MINIO_ROOT_USER=silo \
-e MINIO_ROOT_PASSWORD=silo-secret \
docker.io/pgsty/silo:RELEASE.2026-10-26T00-00-00Z \
server /data --console-address ":9001"
S3_ENDPOINT=http://127.0.0.1:9000 \
S3_BUCKET=gecole-storage-test \
S3_KEY=silo S3_SECRET=silo-secret \
composer test:silo
Without S3_ENDPOINT, composer test:silo skips cleanly.
Use a fully qualified image in CI and with Podman. If Docker Hub is blocked or
rate-limited, Silo also publishes quay.io/pgsty/silo.