定制 astroway/sdk-symfony 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

astroway/sdk-symfony

最新稳定版本:v0.1.0-alpha.1

Composer 安装命令:

composer require astroway/sdk-symfony

包简介

Symfony Bundle for astroway/sdk — DI integration, dataclass collector, Astroway service for autowiring.

README 文档

README

Official Symfony Bundle for astroway/sdk — DI registration, autowireable Astroway service, full config via Symfony's standard astroway.yaml.

Packagist version

Install

composer require astroway/sdk-symfony

The bundle auto-registers via Symfony Flex; if you opted out of Flex, add it manually to config/bundles.php:

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

Configure

Create config/packages/astroway.yaml:

astroway:
    api_key: '%env(ASTROWAY_API_KEY)%'
    base_url: 'https://api.astroway.info/v1'   # optional
    timeout: 30.0                                # optional, seconds
    auth_scheme: header                          # optional, header|bearer

Set ASTROWAY_API_KEY in .env.local.

Use

use Astroway\Astroway;

final class ChartController extends AbstractController
{
    public function __construct(private readonly Astroway $astroway) {}

    #[Route('/chart', methods: ['POST'])]
    public function chart(Request $request): JsonResponse
    {
        $body = json_decode($request->getContent(), true);
        $chart = $this->astroway->chart()->compute($body);
        return new JsonResponse($chart);
    }
}

Autowiring works out of the box — the bundle registers Astroway\Astroway as a public service.

Roadmap

  • 0.1.0-alpha.x — Bundle + DI registration (current).
  • 0.1.0-alpha.2+ — Compiler pass for astroway.namespace tagged services (decoration).
  • 0.1.0-beta.1AstrowayDataCollector for Symfony Profiler (Astroway calls visible in _profiler debug toolbar).
  • 0.1.0-rc.1 — Console commands (bin/console astroway:health, astroway:credits).
  • 0.1.0 — stable surface freeze.

Links

License

MIT — see LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固