Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rest Client Laravel Package

innmind/rest-client

innmind/rest-client is a simple PHP REST client for consuming HTTP APIs. It offers a clean interface for building requests, handling responses, and integrating remote REST services into Laravel or plain PHP applications without boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. innmind/rest-client models a REST API as an immutable specification object: you declare endpoints, methods, and payload shapes, and the library composes a client around them on top of PSR-7/PSR-17/PSR-18. That is architecturally clean and framework-agnostic, but it is orthogonal to Laravel's conventions — no service provider, no facade, no config publishing, no integration with the container's HTTP client, retry/backoff, or event hooks. Adopting it means hand-writing the Laravel glue (bindings, factories, error mapping) that Illuminate\Support\Facades\Http and saloonphp/saloon already provide. The design is closer to a functional/hexagonal library than a Laravel package.

Integration feasibility. Technically possible, not strategically attractive. You need a PSR-17 factory and a PSR-18 client (Guzzle supplies both), plus the Innmind dependency chain (innmind/immutable, innmind/http, etc.), which is larger than the package's surface suggests. The real blocker is lifecycle: the repo is archived, has 2 stars, 0 dependents, and an opportunity score of 2.16. There is no evidence of production validation, and no path to compatibility updates for PHP 8.3/8.4/9 or Laravel 11/12+. Composer conflicts against Laravel's pinned guzzlehttp/* versions are a realistic first-day failure.

Technical risk. High.

  • Abandonment risk: critical. Archived + zero dependents = no upstream fixes, no security response, no PHP/Laravel version support. If a CVE lands in a transitive dependency, you own the patch.
  • Ecosystem lock-in: moderate. Innmind packages tend to pull their own PSR implementations; escaping later is non-trivial once call sites are written against the spec objects.
  • Team risk: moderate. Functional/immutable API style is uncommon in Laravel shops; the mental model (specifications vs. fluent builders) is a real onboarding cost.
  • Supply-chain risk: moderate. Small, unmaintained transitive graph is hard to audit and harder to keep patched.
  • Reward: low. The one genuinely differentiated idea — an API contract as a first-class object — is already available in Laravel-native form via Saloon.

Key questions.

  1. What concrete problem does this solve that Http:: + DTOs, or Saloon, does not?
  2. Do the package's composer.json constraints permit the project's current PHP and Guzzle versions without conflict?
  3. What is the full transitive dependency tree, and are any of those also archived?
  4. Who internally owns the fork/maintenance if adopted — and is that person's time budgeted?
  5. Is the API-spec-as-object model worth the framework-integration effort versus a hand-written typed client?
  6. Does the remote API's contract change often enough that a declarative spec actually pays back?
  7. What is the exit cost if we adopt and abandon in 12 months?

Assessment. Do not adopt as a core or shared dependency for a Laravel codebase. Its value here is as a reference implementation of the API-specification pattern, not as a runtime dependency.

Integration Approach

Stack fit. Poor by default. The package is framework-agnostic and PSR-oriented; Laravel is opinionated and facade-oriented. You can make them coexist, but every ergonomic win (container bindings, config, retries, logging, testing fakes, HTTP events) has to be rebuilt by hand. It fits better in a non-Laravel PHP service, a hexagonal architecture where the HTTP adapter is swappable, or a codebase already standardized on Innmind.

Migration path. If a decision is made to proceed despite the risks:

  • Isolate it behind an application-owned port interface (e.g., App\Contracts\BillingApi) so the Innmind types never leak into domain code.
  • Implement the adapter in one bounded context only — never as a shared foundation package.
  • Register PSR-17 factory, PSR-18 client, and the client spec in a dedicated service provider; map library exceptions to your domain exceptions at the adapter boundary.
  • Prefer a fork under organizational ownership over consuming the archived upstream, so Composer constraints and security patches are controllable.

Compatibility. Verify before any code is written:

  • PHP constraint vs. the project's runtime (8.2/8.3/8.4).
  • Guzzle/PSR-7 constraint overlap with Laravel's locked versions — this is the most likely hard stop.
  • Whether Innmind's PSR implementations conflict with guzzlehttp/psr7 autoloading.
  • Absence of PHP 8.3+ deprecation notices (archived packages frequently emit them and pollute logs).

Sequencing.

  1. Timeboxed spike (1–2 days): composer require on a scratch branch, resolve the dependency tree, make one real GET against a sandbox endpoint, capture conflicts and deprecations.
  2. Decision gate: if constraints conflict, stop — the package fails on compatibility alone.
  3. Port definition: write the application interface first; the library is an implementation detail.
  4. Adapter + contract tests against a recorded/sandbox API, including error and timeout paths.
  5. Feature-flag rollout in one bounded context with a one-quarter observation window.
  6. Review gate: measure maintenance hours spent and upgrade friction; default to replacement with Saloon or Http:: if the tax exceeds the value.

Recommended alternative. For Laravel, saloonphp/saloon covers the typed-client / API-as-object use case with active maintenance, Laravel integration, testing fakes, and community. If the goal is simply calling a third-party API, Http:: with DTOs is sufficient. Reserve innmind/rest-client for evaluation or pattern study only.

Operational Impact

Maintenance. Effectively transferred to you on day one. An archived package receives no bug fixes, no PHP version bumps, no dependency updates, and no security patches. If adopted, budget for a maintained fork (owner, branch policy, CVE watch, quarterly compatibility review). This is a recurring cost, not a one-time integration cost.

Support. No vendor, no active maintainer, no community to escalate to — 2 stars and 0 dependents means issues and Stack Overflow will not help. All knowledge is internal and concentrated in whoever did the integration. Contrast with Saloon/Guzzle, where problems are searchable and fixes are upstream.

Scaling. Runtime scaling is a non-issue: PSR-18 over Guzzle scales exactly as any Laravel HTTP call. The scaling risk is organizational — knowledge concentration, bus factor of one, and a growing "unupgradable island" if the package blocks a Laravel or PHP major bump. Every future framework upgrade inherits this risk.

Failure modes.

  • Upgrade deadlock: Laravel/PHP upgrade blocked by an unresolvable Composer constraint on an archived package.
  • Unpatchable CVE: a transitive dependency is disclosed and no upstream fix will arrive.
  • Remote API drift: the vendor changes its contract; with no upstream releases, you patch a fork or pin and pray.
  • Error-model mismatch: the library's exception semantics differ from Laravel's RequestException/ConnectionException, producing inconsistent handling and observability gaps.
  • Silent misconfiguration: missing PSR-17/18 bindings fail at runtime rather than at boot, surfacing as production incidents.
  • Autoload friction: unconventional namespacing/classmaps interacting badly with Laravel's optimized autoloader in production builds.

Ramp-up. High for a standard Laravel team: expect 1–2 weeks for a senior engineer to become productive with the functional/immutable idioms and the Innmind abstractions, plus ongoing maintainer tax thereafter. Low only if the team already works in Innmind or functional PHP. Factor this into total cost of ownership — it typically exceeds the cost of building a typed client on Saloon or Http:: by a wide margin.

Bottom line. Low opportunity (2.16), no adoption signal (2 stars, 0 dependents), and archived status make this a do-not-adopt for a Laravel product. Revisit only as a design reference, or as an org-owned fork if a specific, documented requirement justifies the maintenance burden.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package