bella-baxter/symfony 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bella-baxter/symfony

最新稳定版本:v0.1.1-beta.88

Composer 安装命令:

composer require bella-baxter/symfony

包简介

Symfony Bundle for the Bella Baxter secret management platform

README 文档

README

Symfony Bundle for the Bella Baxter secret management platform.

Packagist License

Registers BaxterClient as a Symfony service and loads secrets into $_ENV / putenv() on the first HTTP request.

Installation

composer require bella-baxter/symfony

Registration

Add to config/bundles.php:

return [
    // ...
    BellaBaxter\Symfony\BellaBundle::class => ['all' => true],
];

Configuration

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

Usage

Auto-load (default)

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

Service injection

use BellaBaxter\BaxterClient;

class MyService
{
    public function __construct(private BaxterClient $bella) {}

    public function doSomething(): void
    {
        $secrets = $this->bella->getAllSecrets();
    }
}

Autowiring

BaxterClient is registered as a public service and autowired by type — no manual service definition needed.

Configuration reference

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

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固