aeruz/app-registry-client-bundle
PHP/Laravel bundle that simplifies talking to an App Registry service. Provides a client wrapper for registering apps, fetching metadata, and keeping service discovery details in sync, with configuration suited for framework projects and shared deployments.
Aeruz\Registry\Client\ServiceLocator).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Registry Downtime | High | Implement fallback mechanisms (cache local copies of service configs, retry logic). |
| API Changes | Medium | Use feature flags and versioned clients to isolate breaking changes. |
| Authentication | Medium | Ensure Aeruz’s registry supports OAuth2/API keys and integrate via Laravel’s Http\Client. |
| Performance | Low | Benchmark cold-start latency for service discovery. Consider local caching (e.g., Redis). |
| Vendor Lock-in | Medium | Abstract registry calls behind an interface for future swappability. |
.env suffice?AeruzRegistryClient as a bound service in config/app.php or via Laravel’s bind().Http facade or Guzzle (if Aeruz’s registry uses non-standard endpoints).HttpClient (if not using Laravel’s) for better async support (e.g., async: true in requests).Messenger if Aeruz’s registry supports message queues (e.g., for delayed service updates).curl/Guzzle calls with AeruzRegistryClient in:
| Component | Compatibility Notes |
|---|---|
| Laravel Versions | Tested on Laravel 10.x/11.x (PHP 8.1+). Avoid Laravel 9.x if using newer Symfony components. |
| PHP Extensions | Requires cURL, JSON, and OpenSSL (for HTTPS). |
| Caching | Use Laravel Cache (Redis/Memcached) to store local copies of service configs and reduce registry calls. |
| Monitoring | Integrate with Laravel Horizon or Prometheus to track registry latency/errors. |
composer require aeruz/app-registry-client-bundle
php artisan vendor:publish --tag="aeruz-registry-config"
config/aeruz.php.'registry' => [
'endpoint' => env('AERUZ_REGISTRY_URL', 'https://registry.aeruz.example'),
'timeout' => 5.0,
'auth' => [
'type' => 'api_key',
'key' => env('AERUZ_API_KEY'),
],
],
$service = app(AeruzRegistryClient::class)->getService('payments-api');
$url = $service->getEndpoint(); // Use in Guzzle/Http calls
$config = Cache::remember('aeruz_services', now()->addHours(1), function () {
return app(AeruzRegistryClient::class)->getAllServices();
});
update cautiously; test in staging first.Log facade:
Log::debug('Service discovery failed for ' . $serviceName, ['error' => $e->getMessage()]);
AERUZ_API_KEY in .env.registry.timeout in config.php artisan cache:clear) if configs stale.How can I help you explore Laravel packages today?