enabel/eip-bundle
The Enabel EIP Bundle provides a basic integration of EIP in Symfony 6.4+ projects. Install it with Composer, then configure EIP_BASE_URI and EIP_TOKEN in your .env.local file to connect. The project follows SemVer and is released under the MIT license. Created by Enabel.
The README is thin, so treat this bundle as "read the source before you trust it." It is a Symfony bundle (Symfony 6.4+), not a Laravel package — there is no service provider, no Facade, no published config. The entire public surface is whatever Enabel\EipBundle registers in its DI extension.
Install and configure (Symfony context):
composer require enabel/eip-bundle
# .env.local — never commit real values
EIP_BASE_URI=https://eip.example.be/api
EIP_TOKEN=your-token-here
Then let Symfony Flex/auto-discovery register the bundle, or add it manually to config/bundles.php:
Enabel\EipBundle\EipBundle::class => ['all' => true],
Where to look first, in this order:
vendor/enabel/eip-bundle/src/ — find the client/service class (look for anything using HttpClientInterface, Guzzle, or Request).vendor/enabel/eip-bundle/src/DependencyInjection/*Extension.php — this tells you the exact service IDs, aliases, and which parameters (EIP_BASE_URI, EIP_TOKEN) map to what. This file is the real documentation.vendor/enabel/eip-bundle/src/Resources/config/services.* — argument wiring, autowiring aliases, and whether the client is public or private.CHANGELOG.md — check for breaking changes before pinning; the bundle claims SemVer but the API surface is undocumented.First use case: inject the client into a console command or a controller, hit a harmless read endpoint (e.g. a health//me/list call), and dump the raw response to confirm base URI joining, auth header format, and error behaviour before building anything on top.
// First probe — adjust the class name to whatever the extension registers
public function __construct(private EipClient $eip) {}
public function __invoke(): int
{
dump($this->eip->get('/health')); // or whatever method exists
return self::SUCCESS;
}
If you're actually in Laravel: the bundle machinery won't run. You have two options — (a) skip the bundle and call EIP directly with Illuminate\Support\Facades\Http using the same base_uri + withToken, or (b) install the underlying classes if they are framework-agnostic and drive them from a small service provider. For a package with 0 stars and 0 dependents, option (a) is usually the lower-risk path unless the bundle contains substantial request/response mapping logic.
Wrap it, don't scatter it. Whatever the bundle exposes, inject it into one thin application-level adapter (App\Eip\EipGateway) and have the rest of your code depend on that. You get a single place to add logging, retries, and mapping, and you can swap the implementation if the bundle goes stale.
final class EipGateway
{
public function __construct(private EipClient $client, private LoggerInterface $logger) {}
public function fetchResource(string $id): array
{
try {
return $this->client->get("/resources/{$id}");
} catch (\Throwable $e) {
$this->logger->error('EIP fetch failed', ['id' => $id, 'error' => $e->getMessage()]);
throw new EipUnavailableException(previous: $e);
}
}
}
Configuration as first-class values. Bind the env vars to parameters and inject them rather than reading $_ENV in the client wrapper. If the bundle does not expose a config tree, define your own:
# config/services.yaml
services:
App\Eip\EipGateway:
arguments:
$baseUri: '%env(EIP_BASE_URI)%'
$token: '%env(EIP_TOKEN)%'
Multi-environment / multi-tenant. EIP tokens are typically per-instance. Keep separate EIP_* variables per env (.env.test, .env.staging) and, if you need several EIP targets, register named clients manually rather than fighting the bundle's single-parameter wiring.
Test with a fake, not a live call. In Symfony, swap the client for a MockHttpClient in config/services_test.yaml:
services:
Enabel\EipBundle\...\EipClient:
arguments: ['@http_client.mock']
In Laravel, Http::fake(['eip.example.be/*' => Http::response([...])]) covers the same ground if you bypassed the bundle.
Integration tip: map EIP payloads into your own DTOs immediately at the gateway boundary. Field names and shapes from an external platform should never leak into your domain layer — this is especially important here because there are no documented schemas to rely on.
services.yaml inside the bundle are the contract. Read them before assuming method names like get()/post() exist; the README shows nothing about the API..env convention are Flex/Symfony features. In Laravel you get nothing for free — evaluate whether the bundle body is worth extracting or whether a 30-line Http client wrapper is equivalent.EIP_BASE_URI without a trailing slash plus a client that concatenates literally produces .../api/health or .../apihealth depending on implementation. Verify the joined URL with a dump or a profiler request before debugging "404s that should work."EIP_TOKEN is a bearer-style secret. Keep it in .env.local (Symfony) or .env excluded from VCS, never in services.yaml. Rotate it deliberately — a 401 from EIP often looks like a 403 or an empty response depending on the HTTP client's error handling.getContent(false) vs getContent(true); Guzzle throws only with http_errors enabled. Know which one you're using, because your gateway's catch block depends on it.composer.json, and keep the adapter layer thin enough that replacing the bundle is a one-file change. Watch the changelog on each bump.Decorator around the bundle's service to add retries, correlation IDs, or metrics, rather than subclassing internals.framework.http_client.profiler) or set EIP_* to a mock endpoint (e.g. a local httpbin) to inspect exact headers and body the bundle sends. Faster than guessing at token format.src/, since there is no upgrade guide.How can I help you explore Laravel packages today?