capitalise/companies-house-bundle
HttpClient, Serializer). Requires minimal glue code.CompaniesHouseService).symfony/http-client, symfony/options-resolver) to a Laravel project. Risk of version conflicts or unused baggage.guzzlehttp/guzzle) sufficient?HttpClient for API calls, Serializer for responses).config/bundles.php (Luminary) or manually boot it in AppServiceProvider.class CompaniesHouseService {
public function __construct(private ClientInterface $client) {}
public function getCompany(string $id) { /* delegate to bundle */ }
}
HttpClient with Laravel’s Http facade or Guzzle for consistency..env for API keys and rate limits.Company Eloquent model).Illuminate/Cache).Log facade).config/services.php.spatie/laravel-queueable-middleware).Redis).Illuminate/Queue) for bulk API calls.company_number as a DB index).| Failure Type | Impact | Mitigation |
|---|---|---|
| API Downtime | App features break (e.g., company lookup). | Fallback to cached data or user notifications. |
| Rate Limit Exceeded | 429 errors; blocked requests. | Implement exponential backoff + caching. |
| Auth Token Expired | 401 errors; failed requests. | Auto-refresh tokens (bundle may not handle this). |
| Bundle Version Mismatch | Symfony/Laravel conflicts. | Isolate bundle in a separate service layer. |
| Data Schema Changes | API responses break app logic. | Validate responses against contracts (e.g., spatie/fractal). |
How can I help you explore Laravel packages today?