Download the PHP package novay/bunny-secrets without Composer
On this page you can find all versions of the php package novay/bunny-secrets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download novay/bunny-secrets
More information about novay/bunny-secrets
Files in novay/bunny-secrets
Package bunny-secrets
Short Description A Laravel filesystem driver and helper facade for Bunny.net Storage with optional Borneo Secrets Manager API key resolution.
License MIT
Homepage https://github.com/novay/bunny-secrets
Informations about the package bunny-secrets
Bunny Secrets
A small Laravel package for Bunny.net Storage with:
- automatic
bunnycdnfilesystem driver registration; - a
BunnySecretfacade for upload, URL, exists, and delete helpers; - optional API key resolution from Borneo Secrets Manager;
- safe fallback order for API keys to avoid circular filesystem boot errors.
Requirements
- PHP
^8.1 - Laravel
^10.0,^11.0,^12.0, or^13.0 platformcommunity/flysystem-bunnycdn ^3.0
Installation
Laravel package discovery will register the service provider automatically.
Environment
Recommended direct Bunny.net API key setup
Use this when you do not need Borneo Secrets Manager.
Optional Borneo Secrets Manager setup
Turn this on only when the package should resolve the Bunny.net API key from your Borneo Secrets Manager API.
Legacy env names are still supported:
API key resolution order:
BUNNYCDN_API_KEYstorage/app/{BUNNY_SECRET_FILE}- Borneo Secrets Manager, only when
BORNEO_SECRET_ENABLED=true
Recommendation: keep
FILESYSTEM_DISK=localfor Laravel and Livewire temporary uploads. Use thebunnycdndisk only when storing final files.
Usage
Upload with the facade
Delete a file
Check file existence
Use Laravel Storage
Optional Borneo Secrets Manager API
The Borneo Secrets Manager feature remains available, but it is optional and disabled by default. When disabled, the package will not call the secret API during filesystem boot.
storeSecret() and deleteSecret() intentionally throw a clear exception when Borneo Secrets Manager is disabled or incomplete, because those are explicit write/delete actions. getSecret() returns null when the integration is disabled, not configured, or the secret cannot be resolved.
Configuration
The package publishes config/bunnycdn.php.
You do not need to manually add a bunnycdn disk to config/filesystems.php; the package registers it at runtime from config/bunnycdn.php. If you do define filesystems.disks.bunnycdn, your app-level values override the package defaults.
Failure behavior
This package avoids the previous circular failure where the service provider tried to read the API key through Laravel's default Storage disk before the custom bunnycdn driver existed.
Current behavior:
- The
bunnycdndriver is always registered during boot. - Borneo Secrets Manager is disabled by default and used only when
BORNEO_SECRET_ENABLED=true. - Missing
storage_zoneorapi_keythrows a clearBunnySecretExceptionwhen the disk is used. - Facade helpers such as
uploadCDN()catch upload errors, log context, and returnfalsefor backward compatibility.
Useful commands after changing config
License
This package is licensed under the MIT License.
All versions of bunny-secrets with dependencies
illuminate/filesystem Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
league/flysystem Version ^3.0
platformcommunity/flysystem-bunnycdn Version ^3.0