lendo-stp-gdansk/lendo-infrastructure-bundle
Infrastructure bundle for Lendo STP Gdańsk Laravel applications, packaging shared service providers, configuration defaults, HTTP clients, logging and health-check wiring so teams can bootstrap services consistently and avoid duplicating common integration code.
This is an internal infrastructure bundle maintained by Lendo STP Gdańsk. With zero public stars and no dependents, treat it as an organization-specific package rather than a community library — the README and the service provider are your real documentation.
Install and inspect before wiring anything up.
composer require lendo-stp-gdansk/lendo-infrastructure-bundle
Then immediately read what Composer actually pulled in:
composer show lendo-stp-gdansk/lendo-infrastructure-bundle
ls vendor/lendo-stp-gdansk/lendo-infrastructure-bundle
Check composer.json for extra.laravel.providers (auto-discovery) versus a Symfony-style DependencyInjection/*Extension.php. The package name says "bundle," which usually implies Symfony conventions; confirm whether it exposes a Laravel ServiceProvider at all before assuming php artisan vendor:publish will work.
Look first at these files, in order:
README.md — the only usage contract that exists.src/*ServiceProvider.php (or DependencyInjection/) — what gets bound, tagged, or registered.config/ — every key you're expected to fill in.CHANGELOG.md / tags — how actively it moves and whether breaking changes are frequent.First use case: standardize cross-cutting concerns across services. Infrastructure bundles typically own logging channels, health/metrics endpoints, HTTP client defaults (timeouts, retries, correlation IDs), queue/worker config, and shared base classes. Start by adopting one of those — usually the health endpoint or the HTTP client — rather than enabling everything at once. That gives you a reversible slice and a fast signal on whether the package fits.
Configuration-first registration. Publish and diff the config rather than relying on package defaults:
php artisan vendor:publish --provider="Lendo\Infrastructure\InfrastructureServiceProvider" --tag=config
Then commit the published file so environment drift is visible in review. For a Symfony-style bundle, the equivalent is importing the bundle's service definition and overriding parameters in config/services.yaml.
Wrap the package behind your own adapter. Since the package is internal and unversioned in practice, isolate it:
// app/Infrastructure/HealthProbe.php
final class HealthProbe
{
public function __construct(private readonly LendoHealthClient $client) {}
public function check(): array
{
return $this->client->report(); // single seam to swap out later
}
}
Bind it in a small app-level provider. If the bundle is ever deprecated or diverges from your service's needs, you change one class instead of hunting usages.
Environment-driven config, not code branches. Infrastructure bundles almost always read env on boot. Keep every knob in config/infrastructure.php mapped to an env() call, and set those per-environment in your deploy config (not in .env committed to the repo). Typical culprits: log level, sampling rate, external endpoint URLs, timeout values, and feature flags.
// config/infrastructure.php
return [
'http' => [
'timeout' => env('INFRA_HTTP_TIMEOUT', 3),
'retries' => env('INFRA_HTTP_RETRIES', 2),
'base_url' => env('INFRA_BASE_URL'),
],
'health' => [
'enabled' => env('INFRA_HEALTH_ENABLED', true),
'path' => env('INFRA_HEALTH_PATH', '/_health'),
],
];
Integration points to check explicitly.
Http facade or ships its own client. If it decorates, correlation-ID propagation happens automatically; if it ships its own, you must inject it everywhere and Http:: calls silently bypass it.Testing pattern. Use Laravel's RefreshDatabase plus an explicit config reset for bundle keys, and stub any external infrastructure calls with Http::fake():
protected function setUp(): void
{
parent::setUp();
config(['infrastructure.health.enabled' => false]); // keep tests offline
Http::fake(['*' => Http::response(['status' => 'ok'], 200)]);
}
If the bundle binds singletons that hold state (clients, buffers), assert on behavior through the adapter, not by reaching into the container.
ServiceProvider. Symfony bundles need config/bundles.php and won't auto-discover. If it's Symfony-flavored, plan on a thin bridge or skip it in a Laravel app.php artisan config:clear. Infrastructure bundles often read config in register() rather than boot(), so stale caches produce baffling behavior where "the env var is set but nothing changed."Log::getLogger()->getHandlers() when in doubt./_health and /health. If your app or load balancer already defines one, you'll get a route conflict or, worse, two endpoints answering differently — one checking the DB, one not. Grep your routes with php artisan route:list | grep -i health."1.2.3", not "^1.0") and upgrade deliberately with the changelog open.composer why lendo-stp-gdansk/lendo-infrastructure-bundle → confirm it's discovered (php artisan about shows providers) → confirm config resolved (config('infrastructure')) → confirm container bindings (app()->bound(...)) → then trace the actual call path. Most "bundle is broken" reports are config precedence.How can I help you explore Laravel packages today?