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

Http Slim Laravel Package

juststeveking/http-slim

A lightweight Laravel package for slimming HTTP responses, trimming unnecessary headers and overhead so your app returns leaner, cleaner, faster responses with minimal configuration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on the integration layer — and the honest framing is "borrow vs. build." The realistic comparison is not a vendor platform against this package; it's roughly 100 lines of base-client code against an internal abstract class we could write in an afternoon. Making that comparison explicit is itself the decision, because it forces the team to agree on a single standard shape for every third-party integration we own.
  • Resolving a scope contradiction before anything else. This is the first PM action item, not a footnote. The package description describes a Laravel middleware that strips response headers ("slim responses," allow/deny lists, fingerprint reduction). The release notes and both technical assessments describe a PSR-18 HTTP client base class with autodiscovery and a plugin system. Those are different packages with different value propositions, different risk profiles, and different adoption paths. A 30-minute composer require + ls vendor/.../src + cat composer.json spike resolves it. Do not let a roadmap item, a sprint ticket, or a slide deck be written against the wrong one — and treat the fact that the public metadata is this unreliable as a data point about the project's stewardship.
  • If it is the header-slimming middleware: the decision it supports is a security-hardening and bandwidth call — removing X-Powered-By, Server, and other disclosing headers is a cheap win and largely achievable with a few lines of nginx/Laravel middleware. The package saves maybe an hour. That is a "nice to have," not a roadmap item, and it should not be the reason anyone spends a procurement cycle.
  • If it is the HTTP client base class: the decision it supports is standardising how we call third parties. Today that code is almost certainly scattered Http:: calls in controllers and jobs, each with its own error handling and response unpacking. The package's genuine product value is a convention — one class per API, owning its base URL, headers, auth, and endpoints, returning a predictable shape. That is a maintainability and code-review decision, and it is cheap to make.
  • Roadmap flexibility when adding or swapping providers. Because it forwards to Laravel's HTTP client, fakes, middleware, retries, and fluent requests carry over. Adding the next provider becomes "extend the class, add methods." If the roadmap contains three or more new third-party APIs in the next two quarters, the convention pays for itself regardless of whether we keep the dependency.
  • Transport portability as an explicit architectural posture. The v2.1.0 notes claim PSR-18/17 autodiscovery and a php-http/common plugin seam. If real, that is an option to swap the underlying client later. It is a pattern argument, not a dependency argument, and it must be verified in source before anyone writes it into an architecture doc as capability.
  • A dependency-risk call disguised as a feature decision. 7 stars, 0 dependents, no release since 2021-08-27. Those are the numbers that matter for the procurement conversation. The package is decent evidence that a design pattern is sound; it is not evidence of an adoption base, a support commitment, or a security-patch cadence for a component that carries outbound credentials and headers.

When to Consider This Package

Consider it — most likely to study and adapt rather than depend on — when:

  • You have multiple third-party API integrations and want one consistent, testable shape instead of repeated Http:: boilerplate in every consumer.
  • Your stack is Laravel and you're content to stay on Laravel's HTTP client semantics. The package's value is largely inherited from that client; it adds convention, not capability.
  • You want a reference implementation of the "base client you extend per API" pattern to copy, fork, or reimplement internally. This is the single strongest reason to open the repo at all.
  • The PSR autodiscovery/plugin seam is genuinely present in the source and you have a foreseeable need for transport portability. Verify both before counting either as a benefit.
  • You can pin exactly 2.1.0 (not ^2.1) and accept it as effectively frozen, with a written replacement deadline and no expectation of upstream support.
  • MIT licensing makes vendoring or forking into app/Support/ legally trivial — a genuine mitigation that lowers this from "risk" to "accepted cost."

Look elsewhere, or just build it, when:

  • You need an actively maintained dependency. Four years without a release means you are the maintainer. A short internal base class is almost certainly cheaper to own than to inherit and then replace — and you avoid the Laravel 10/11 signature-drift fatal (Declaration of ... must be compatible with ...) that surfaces at deploy rather than in tests.
  • You have one HTTP client and no ambition to swap it. Laravel's own HTTP client already gives you fakes, retries, middleware, and fluent requests. The package adds a thin layer of naming convention and nothing you can't write in an afternoon with better long-term support.
  • You cannot resolve the scope contradiction. If 30 minutes of source inspection doesn't tell you unambiguously what this package does, that is your answer. Ambiguity in the README is a leading indicator of ambiguity everywhere else.
  • The component sits in the request path with credentials. Any package handling outbound auth needs a security-advisory cadence. There is none here, and no dependents to shake out a bad composer update.
  • You were drawn in by the plugin API. Shipped in a minor release, unproven, zero dependents, dormant since 2021. Extension points in abandoned packages become your permanent API surface with no upstream compatibility guarantees. Treat it as reference design only.
  • You'd have to leave it as an unpinned transitive dependency. Non-starter. Pin it, vendor it, or don't take it.

The two extension points that survive scrutiny: subclassing the base client, and the interface you define at the call-site boundary. The second is what makes "remove the package" a one-file change instead of a refactor.

How to Pitch It (Stakeholders)

One-line summary for executives: This is a small, unmaintained open-source component that demonstrates a good pattern for calling third-party APIs from Laravel — we should copy the pattern into roughly 100 lines of code we own, not add the package as a dependency.

For executives — the decision and the risk:

  • The upside is convention and velocity: one class per external API, base URL and credentials in one place, and a testing story that reuses Laravel's existing HTTP fakes. If the roadmap includes several new integrations, this is a genuine accelerator.
  • The downside is ownership: 7 GitHub stars, zero dependents, last release August 2021, no security-advisory cadence — for a component that carries outbound credentials. Adopting it means we become its maintainer, with none of the control.
  • Recommendation: treat it as a design reference. Reproduce the pattern internally under the MIT license's freedoms, keep the call-site interfaces ours, and avoid a permanent dependency on a dormant project. Cost is measured in hours, not sprints; the durable value is the team agreeing on one integration shape.
  • Open item before commitment: the package's public description and its release notes describe two different packages (header-stripping middleware vs. PSR-18 HTTP client). A short technical spike resolves which is real and whether any of the above applies. No roadmap commitment until that lands.

For engineering — what we'd actually do:

  • Resolve the scope question first (composer require ...:2.1.0, inspect src/ and composer.json for php-http/discovery and php-http/client-common), then decide. If autodiscovery is real, pin the resolved client explicitly in a service provider — silent resolution of a different PSR-18 client is a behavioural change with no code change on our side.
  • Whether we adopt or reimplement, ship the same three things: an abstract base client owning base URI, headers and auth; a per-API interface bound in a service provider so call sites are swappable; and DTOs mapped immediately from responses so raw payloads never travel up the stack.
  • Make Http::fake() plus Http::assertSent the standard regression test at the HTTP layer. That closure is what protects base-URI assembly, header merge order, and auth — the three things that break silently across Laravel upgrades.
  • Pin the version if we take it, add a smoke test that instantiates each client and calls one faked endpoint, and run it on every Laravel upgrade PR specifically.
  • Write the one-page internal reference doc — base class plus one worked example. With no dependents and no recent releases, we are the community, and that doc is what stops the next developer from quietly reaching for raw Http:: again.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core