anripuankare/atol-client-bundle
symfony/yaml or a custom parser).@atol_client.v4 injection pattern mirrors Laravel’s bind()/resolve() or Facade-based service binding.Bundle system (e.g., registerBundles()). Workarounds (e.g., manual service registration) will be needed.laravel/validation, spatie/array-to-object) would require refactoring or wrappers.lamoda/atol-client (PHP 7.2+/8.1) is language-agnostic and can be used directly in Laravel without the bundle. The bundle adds Symfony-specific glue (config, DI, validation), which is not required for Laravel.guzzlehttp/guzzle), but the bundle’s config-driven setup would need replacement with Laravel’s config/atol.php or environment variables.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony DI Dependency | High | Replace Bundle with Laravel service providers or manual binding. |
| JMS Serializer | Medium | Use Laravel’s native JSON serialization or spatie/array-to-object. |
| Validation Annotations | Medium | Replace with Laravel’s ValidatesWhen or custom rules. |
| Outdated Releases | Low | Fork or patch the bundle for Laravel compatibility. |
| Guzzle Config Rigidity | Low | Override config defaults in Laravel’s AppServiceProvider. |
Why a Bundle?
lamoda/atol-client be used directly in Laravel?API Usage Scope
callback_url) require Laravel queue workers?Validation/Serialization
Error Handling
AtolException class be created?Testing
Mockery, VCR) be used for testing?lamoda/atol-client (PHP 7.2+/8.1) is Laravel-compatible.guzzlehttp/guzzle).Illuminate\Validation\Validator.json_encode()/json_decode() or spatie/array-to-object.Bundle with Laravel’s ServiceProvider or bind() in AppServiceProvider.lamoda/atol-client directly (no bundle).Assessment Phase:
Minimal Viable Integration:
lamoda/atol-client directly:
composer require anripuankare/atol-client
AppServiceProvider:
$this->app->singleton('atol.guzzle', fn() => new \GuzzleHttp\Client());
AtolClient:
class AtolService {
public function __construct(private AtolClient $client) {}
public function createOrder(array $data) { /* ... */ }
}
Bundle Adaptation (If Needed):
anripuankare/atol-client-bundle.Bundle with a Laravel ServiceProvider:
class AtolServiceProvider extends ServiceProvider {
public function register() {
$this->app->bind('atol.client.v4', fn($app) => new \Lamoda\AtolClient\AtolClient(
$app['config']['atol.clients.default']
));
}
}
json_encode() or a custom serializer.Validator::make().Configuration:
config/atol.php:
return [
'clients' => [
'default' => [
'version' => \Lamoda\AtolClientBundle\AtolClientBundle::API_CLIENT_VERSION_4,
'base_url' => env('ATOL_V4_URL'),
'callback_url' => env('ATOL_CALLBACK_URL'),
],
],
];
| Component | Laravel Equivalent | Notes |
|---|---|---|
Symfony Bundle |
ServiceProvider or bind() |
Higher effort for full feature parity. |
| JMS Serializer | json_encode()/json_decode() |
May require manual payload handling. |
| Symfony Validator | Illuminate\Validation\Validator |
Rewrite validation rules. |
| Guzzle Config | Laravel’s config() helper |
Use environment variables for secrets. |
| Dependency Injection | Laravel’s container | Works, but Bundle lifecycle hooks are lost. |
lamoda/atol-client (low risk).lamoda/atol-client is actively maintained (last commit: 2023), but the bundle is stale (2022).lamoda/atol-client as the source of truth and build Laravel wrappers.config/atol.php) reduces risk of syntax errors but may require tooling (e.g., laravel/envoy) for cross-environment consistency.lamoda/atol-client reduces lock-in; the bundle adds Symfony-specific support overhead.tap() or dd() can help debug payloads/responses.lamoda/atol-client issues.HttpClient in PHP 8.1+).| Scenario | Impact | Mitigation | |------------------------------|--------------------------------
How can I help you explore Laravel packages today?