ndrstmr/steg-bundle
Composer 安装命令:
composer require ndrstmr/steg-bundle
包简介
Symfony Bundle for Steg — auto-configuration, profiler panel, and DI integration
README 文档
README
Important
Dieses Paket ist umgezogen. Entwicklung und Releases laufen jetzt im
Monorepo public-sector-dev-crew/lotse-fleet
(Verzeichnis packages/steg-bundle). Dieses Repository ist eingefroren und wird archiviert.
- Neuer Composer-Name:
lotse/steg-bundle(vormalsndrstmr/steg-bundle) - Umstellen:
composer remove ndrstmr/steg-bundle && composer require lotse/steg-bundle - Der PHP-Namespace
Steg\Bundle\bleibt unverändert — nur dierequire-Zeile ändert sich. - Packagist: https://packagist.org/packages/lotse/steg-bundle
steg-bundle
Symfony Bundle for Steg — auto-configuration, profiler panel, and DI integration.
Requirements
- PHP 8.2+
- Symfony 7.0+ or 8.0+
- ndrstmr/steg ^1.0.1 (v1.0.0 has an incompatible
StegClientand is not supported)
Installation
composer require ndrstmr/steg-bundle
Symfony Flex will register the bundle automatically. Without Flex, add it manually:
// config/bundles.php return [ // ... Steg\Bundle\StegBundle::class => ['all' => true], ];
Configuration
Create config/packages/steg.yaml:
steg: connections: vllm_local: dsn: '%env(STEG_VLLM_DSN)%' # e.g. vllm://gpu-server:8000/v1?model=llama-3.3-70b-awq timeout: 120 ollama_dev: dsn: 'ollama://localhost:11434?model=qwen2.5:7b' timeout: 60 mock: dsn: 'mock://default' default_connection: vllm_local
DSN format
| Scheme | Example |
|---|---|
vllm:// |
vllm://gpu-server:8000/v1?model=llama-3.3-70b-awq |
ollama:// |
ollama://localhost:11434?model=qwen2.5:7b |
mock:// |
mock://default |
Alternative: explicit base_url
steg: connections: vllm_local: base_url: '%env(VLLM_BASE_URL)%' model: '%env(VLLM_MODEL_NAME)%' api_key: '%env(VLLM_API_KEY)%' timeout: 120
Usage
Autowiring (default connection)
use Steg\Client\InferenceClientInterface; use Steg\Model\ChatMessage; final class MyService { public function __construct( private readonly InferenceClientInterface $steg, ) {} public function translate(string $text): string { $response = $this->steg->complete([ ChatMessage::system('You are a translation assistant.'), ChatMessage::user($text), ]); return $response->content; } }
Named connections via #[Autowire]
use Steg\Client\InferenceClientInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; final class MyService { public function __construct( #[Autowire(service: 'steg.client.vllm_local')] private readonly InferenceClientInterface $vllm, #[Autowire(service: 'steg.client.ollama_dev')] private readonly InferenceClientInterface $ollama, ) {} }
Available service IDs
| Service ID | Description |
|---|---|
steg.client.{name} |
Named connection client |
steg.client |
Alias for the default connection |
Steg\Client\InferenceClientInterface |
Alias for the default connection |
Symfony Profiler
When StegDataCollector is wired, the Symfony Profiler shows a Steg panel with:
- Request count and total duration
- Prompt and completion token usage
- Per-request timeline (connection, model, duration, tokens, response preview)
To enable profiling, decorate your client services with ProfilingClient in the DI configuration.
License
EUPL-1.2 — see LICENSE.
Built by 👾 public sector dev crew
Notice
This repository was developed with the assistance of AI code agents (Claude Code, Anthropic). The code was created as part of a development sprint and is not cleared for production use without prior review. Use at your own risk.
License: European Union Public Licence v. 1.2 (EUPL-1.2) — Copyright © 2026 Andreas Teumer
ndrstmr/steg-bundle 适用场景与选型建议
ndrstmr/steg-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 48 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「php」 「bundle」 「inference」 「ai」 「llm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ndrstmr/steg-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ndrstmr/steg-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ndrstmr/steg-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
Bundle Symfony DaplosBundle
Provides a Data Grid tables for your Symfony project.
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 42
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: EUPL-1.2
- 更新时间: 2026-05-06