Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Sdk Symfony

Sdk Symfony Laravel Package

astroway/sdk-symfony

Official Symfony bundle for astroway/sdk. Provides DI registration and an autowireable Astroway service with standard Symfony configuration via astroway.yaml (API key, base URL, timeout, auth scheme). Works with Symfony Flex or manual bundle registration.

View on GitHub
Deep Wiki
Context7

Official Symfony Bundle for astroway/sdk — DI registration, autowireable Astroway service

Frequently asked questions about Sdk Symfony
Can I use astroway/sdk-symfony directly in Laravel, or do I need a workaround?
No, the bundle is Symfony-specific. You’ll need to manually register the `Astroway` service in Laravel’s `AppServiceProvider` or create a custom wrapper to replicate its DI and config features. The core `astroway/sdk` package can still be used standalone in Laravel.
How do I configure astroway/sdk in Laravel if I skip the Symfony bundle?
Use Laravel’s `.env` file for API keys and `config/astroway.php` to define settings like `base_url`, `timeout`, and `auth_scheme`. Bind the `Astroway` service in `AppServiceProvider` using these config values, similar to how the Symfony bundle registers it.
What Laravel version does this package support, or is it only for Symfony?
This package is **not** Laravel-compatible by design—it’s built for Symfony 6.4+/7.x. However, the underlying `astroway/sdk` (v0.1.0-alpha.0+) can be used in Laravel with manual setup. No official Laravel version support exists for the Symfony bundle itself.
Is there a risk of breaking changes since this is in alpha?
Yes, the bundle is pre-1.0.0 and lacks a stable release. The roadmap includes breaking changes (e.g., compiler passes, Profiler integration) before `0.1.0`. Test thoroughly in a staging environment if evaluating for production. The core `astroway/sdk` may also evolve independently.
How do I autowire the Astroway service in Laravel without the Symfony bundle?
Laravel doesn’t support Symfony’s autowiring natively. Instead, bind the service in `AppServiceProvider` with `$this->app->singleton(Astroway::class, fn($app) => new Astroway(config('astroway.api_key'), ...));`. Then use type-hinting in controllers/services as usual.
Are there Laravel-native alternatives to this bundle for Astroway API integration?
Yes. For lightweight use, pair `astroway/sdk` with Laravel’s HTTP client or Guzzle. For config management, use Laravel’s `config/astroway.php`. Avoid reinventing the wheel unless you need Symfony-specific features like Profiler integration (which would require custom Laravel Debugbar adapters).
Will the Symfony bundle’s Profiler integration work with Laravel Debugbar?
No, the `AstrowayDataCollector` is Symfony Profiler-specific. To replicate this in Laravel, you’d need to create a custom Debugbar subscriber or use Laravel’s built-in logging. The bundle’s roadmap features may not align with Laravel’s tooling without manual adaptation.
How do I handle API timeouts or auth failures in Laravel with this SDK?
Configure timeouts and auth schemes in `config/astroway.php` (e.g., `timeout: 30`, `auth_scheme: 'header'`). The `astroway/sdk` handles retries and errors internally, but log exceptions with Laravel’s `Log::error()` for debugging. No Symfony-specific error handlers are included.
Does this bundle add performance overhead in Laravel if I adapt it?
Potentially. The Symfony bundle uses compiler passes and decorators, which Laravel’s simpler DI container may not need. If you replicate its features manually (e.g., config loading, service binding), avoid unnecessary complexity. Profile with Laravel’s `bench()` or Blackfire to compare.
How do I secure API keys in Laravel vs. Symfony’s YAML config?
Use Laravel’s `.env` file for `ASTROWAY_API_KEY` and restrict access via `config('astroway.api_key')` in code. Symfony’s YAML supports `%env()` placeholders, but Laravel’s `.env` is more secure by default. Never hardcode keys in PHP files or version-controlled configs.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
headercat/phpstan-extension-ide-helper
yosymfony/parser-utils
innmind/black-box
babenkoivan/elastic-migrations
babenkoivan/elastic-adapter
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle