happyr/linkedin-bundle
Symfony bundle for LinkedIn integration that provides OAuth authentication and API client wiring, making it easier to add LinkedIn login and profile/data access to PHP applications with configurable services and less boilerplate.
Architecture fit — poor as packaged, and the premise needs correcting. Despite being catalogued here as a "Laravel/PHP package," happyr/linkedin-bundle is a Symfony bundle, not a Laravel package. It contains no service provider, no facade, no publishable config, and no Illuminate dependency. It exists solely to register happyr/linkedin-api-client in a Symfony DI container (happyr_linkedin configuration keys, a container-managed client service). Installing it into a Laravel application produces a dead dependency at best and a Composer conflict at worst. The reusable asset is the underlying client library, not this bundle.
Integration feasibility — the wrapper is the wrong layer to adopt. The value we'd actually consume is happyr/linkedin-api-client: a framework-agnostic PHP client handling OAuth 2.0 code exchange, access-token persistence helpers, and typed calls against LinkedIn's REST endpoints. That library can be bound into Laravel's container in roughly 60–100 lines. The bundle adds nothing to that path. Additionally, the bundle's Symfony version constraints are from the Symfony 2.8/3.x era (last release February 2018), so it will not resolve against Symfony 5/6/7 or modern PHP 8.x runtimes without a fork.
Technical risk — high, concentrated in three areas.
LinkedIn-Version, X-Restli-Protocol-Version headers), and shifted "Sign In with LinkedIn" onto OpenID Connect. A 2018 client almost certainly targets endpoints and scope names (r_basicprofile, r_liteprofile) that are deprecated or removed.Key questions for the requester.
Stack fit. Recommended path: do not install the bundle. Two viable options, in order of preference:
| Option | Dependency | When to choose |
|---|---|---|
| A. Laravel Socialite + LinkedIn OIDC driver | laravel/socialite |
Login/profile only — no new vendor risk |
B. Bind happyr/linkedin-api-client in a custom provider |
happyr/linkedin-api-client |
Need API calls beyond identity |
| C. Adopt the bundle as-is | happyr/linkedin-bundle |
Only if the target is Symfony 3.x — otherwise reject |
Migration path (Option B, if API access is genuinely required).
composer require happyr/linkedin-api-client and verify it resolves on our PHP version; if not, vendor-fork it into packages/.config/linkedin.php (client ID, secret, redirect URI, scopes) sourced from environment/secret manager — never committed.LinkedInServiceProvider binding the client as a singleton; expose a thin LinkedInGateway interface so the vendor client is swappable.LinkedInTokenStore abstraction backed by our existing user table or a dedicated credentials table with encryption at rest.state for CSRF and validate it.Compatibility. Confirm PHP constraint, PSR-7/HTTPlug-era HTTP abstraction compatibility with our HTTP client (Guzzle 7 adapter or symfony/http-client bridge), and that no transitive dependency pins an EOL Symfony component. Expect at least one pin to break.
Sequencing. (1) Spike: confirm LinkedIn app approval + scopes, 2–3 days. (2) Decide Option A vs. B based on that answer. (3) Build token store and gateway interface. (4) Implement OAuth flow end-to-end in staging. (5) Add feature endpoints behind the gateway. (6) Production rollout with a kill switch (config flag that disables the integration without deploy).
Maintenance. Effectively zero upstream maintenance. Treat the client as vendored, owned code: fork it into our monorepo, add it to the internal dependency register, and assign an owner. A 2018 client will require patching on LinkedIn's schedule, not ours — plan for reactive work each time LinkedIn ships an API version.
Support. No vendor, no SLA, no security-response channel. A vulnerability in the HTTP or OAuth layer would be discovered by us, not reported to us. This is acceptable for a low-blast-radius login feature and unacceptable for anything touching Ads spend or member data at scale.
Scaling. The integration is stateless per-request HTTP; it scales horizontally without special handling. The real ceilings are LinkedIn's, not ours: per-app and per-member rate limits, 429 responses, and token lifetimes (60-day access tokens; refresh tokens only for certain products). Design for: caching profile payloads (short TTL) rather than fetching per page view, queueing any bulk or write operation, retry with exponential backoff on 429/5xx, and a circuit breaker so LinkedIn outages degrade gracefully instead of stalling request threads.
Failure modes to instrument.
Ramp-up. For a Symfony-fluent engineer: under a day to read the bundle, but that knowledge does not transfer to our stack. For a Laravel team: treat ramp-up as "learn the LinkedIn REST API and OAuth 2.0," roughly 2–4 days, and assume zero useful prior art from this package. The bundle's documentation and examples will actively mislead on scopes and endpoints.
Recommendation. Reject happyr/linkedin-bundle for a Laravel target. Default to Laravel Socialite if the need is authentication; fall back to a self-owned wrapper around happyr/linkedin-api-client only if confirmed, approved API scopes require it — and only with a forked, internally owned copy.
How can I help you explore Laravel packages today?