Symfony Bundle for the Bella Baxter secret management platform.
Registers BaxterClient as a Symfony service and loads secrets into $_ENV / putenv() on the first HTTP request.
composer require bella-baxter/symfony
Add to config/bundles.php:
return [
// ...
BellaBaxter\Symfony\BellaBundle::class => ['all' => true],
];
Create config/packages/bella.yaml:
bella:
url: '%env(BELLA_BAXTER_URL)%'
api_key: '%env(BELLA_BAXTER_API_KEY)%'
auto_load: true # optional, default: true
Set environment variables in .env:
BELLA_BAXTER_URL=https://api.bella-baxter.io
BELLA_BAXTER_API_KEY=bax-your-api-key
With auto_load: true, secrets are injected into $_ENV on the first request:
// In any controller or service:
$dbUrl = $_ENV['DATABASE_URL']; // from Bella Baxter
$dbUrl = getenv('DATABASE_URL'); // same
$dbUrl = $_SERVER['DATABASE_URL']; // same
use BellaBaxter\BaxterClient;
class MyService
{
public function __construct(private BaxterClient $bella) {}
public function doSomething(): void
{
$secrets = $this->bella->getAllSecrets();
}
}
BaxterClient is registered as a public service and autowired by type — no manual service definition needed.
| Key | Default | Description |
|---|---|---|
url |
— | Base URL of the Baxter API |
api_key |
— | API key from bella apikeys create |
auto_load |
true |
Load secrets into $_ENV on first request |
How can I help you explore Laravel packages today?