astroway / sdk-symfony
Symfony Bundle for astroway/sdk — DI integration, dataclass collector, Astroway service for autowiring.
Package info
github.com/astroway/astroway-php-symfony
Type:symfony-bundle
pkg:composer/astroway/sdk-symfony
Requires
- php: ^8.1
- astroway/sdk: >=0.1.0-alpha.0
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^10.5
- symfony/yaml: ^6.4 || ^7.0
This package is auto-updated.
Last update: 2026-05-10 23:17:40 UTC
README
Official Symfony Bundle for
astroway/sdk— DI registration, autowireableAstrowayservice, full config via Symfony's standardastroway.yaml.
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 forastroway.namespacetagged services (decoration).0.1.0-beta.1—AstrowayDataCollectorfor Symfony Profiler (Astroway calls visible in_profilerdebug toolbar).0.1.0-rc.1— Console commands (bin/console astroway:health,astroway:credits).0.1.0— stable surface freeze.
Links
- 📦 Packagist: https://packagist.org/packages/astroway/sdk-symfony
- 📦 Core SDK:
astroway/sdk - 📘 API docs: https://api.astroway.info/docs/
License
MIT — see LICENSE.