coka/service-discovery-bundle
/api/v1 to service-a:8080 or service-b:8081).HttpClient and DependencyInjection; Laravel uses Guzzle and Service Container. A wrapper or adapter layer would be needed.ContainerInterface differs from Laravel’s Container; DI bindings would require customization.HttpClient with Guzzle (Laravel’s default).ServiceDiscovery logic to Laravel’s service container (e.g., bind the discovery client as a singleton).config/packages/oka_service_discovery.yaml) to Laravel’s config/services.php.| Risk Area | Mitigation Strategy |
|---|---|
| DI Incompatibility | Create a Laravel service provider to bridge Symfony’s ContainerInterface. |
| HTTP Client Mismatch | Abstract the client layer or use a facade to delegate to Guzzle. |
| Discovery Logic | Test edge cases (e.g., stale caches, network partitions) in a staging environment. |
| Performance Overhead | Benchmark against Laravel’s native service resolution (e.g., app()->make()). |
| Maintenance Burden | Fork the repo to apply Laravel-specific fixes or contribute upstream changes. |
laravel-discovery, custom service registries)?HttpClient with a thin adapter.ServiceProvider can register the bundle’s services, translating Symfony’s tags to Laravel’s bindings.config() helper to load bundle settings from config/services.php.composer require coka/service-discovery-bundle.symfony/http-client and symfony/dependency-injection as dev dependencies if needed.HttpClient with Guzzle.api.example.com).symfony/http-client, symfony/dependency-injection, etc., to avoid conflicts.config/services.php under oka_discovery.services").ServiceDiscovery::resolve() calls) for observability.php artisan service:discover to refresh endpoints).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Discovery service unavailable | All dynamic routes fail. | Fallback to static endpoints. |
| Stale cache | Clients use outdated endpoints. | Short TTL + cache invalidation hooks. |
| Network partition | Partial service outages. | Circuit breakers (e.g., Guzzle middleware). |
| Configuration errors | Invalid service registrations. | Validation in config/services.php. |
| Bundle updates break compatibility | Integration fails. | Semantic versioning + CI checks. |
How can I help you explore Laravel packages today?