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

Psr7 Middlewares Laravel Package

oscarotero/psr7-middlewares

A collection of PSR-7 middleware for PHP, including authentication, caching, CORS, HTTPS, and routing. Works with any PSR-7 compatible framework or application.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for cross-cutting HTTP concerns. This package enumerates the standard set — auth, CORS, caching, redirects, HTTPS enforcement, error handling, content negotiation, payload parsing, client IP resolution — which is a useful checklist for scoping. Use it to answer "which of these do we actually need in v1?" rather than to answer "which library do we install?"
  • Middleware architecture and layering. The package's composition model (single-responsibility handlers chained in a pipeline) is a good reference for defining our own middleware contract — ordering guarantees, short-circuiting, and where request/response mutation is allowed.
  • Roadmap sequencing for platform-level features. If CORS, HTTPS enforcement, or content negotiation are on the roadmap, the package gives a concrete, ~small-scale estimate of what each one costs to own. That informs whether to schedule them as platform work or fold them into feature tickets.
  • Standards posture. PSR-7/PSR-15 alignment affects interoperability, hiring, and vendor choice. Evaluating this package forces an explicit decision: do we commit to PSR-7 as our HTTP abstraction, or stay on the framework's native request/response objects?
  • Vendor and dependency risk assessment. This is the canonical example of a "high utility, zero maintenance" dependency. It's a reusable template for how we score third-party packages: release recency, archive status, transitive surface area, and migration cost if abandoned.
  • Retrofit vs. rewrite decisions on legacy services. For any existing service already running a PSR-7 stack, this package defines the migration surface — you need a replacement for every handler it currently provides.

When to Consider This Package

Consider it (as reference material, not a dependency) when:

  • You are designing a greenfield middleware layer and want a proven inventory of HTTP concerns to design against.
  • You are on a legacy PHP 7.x service already using a PSR-7/PSR-15 dispatcher and need to understand what a handler in this space is expected to do.
  • You are scoping effort for auth, CORS, or content negotiation and want a sanity check on implementation size.
  • You need a compatibility baseline: what a "complete" PSR-7 middleware set looks like, so you can reason about gaps in lighter alternatives.

Do not adopt it as a dependency when:

  • Anywhere in a Laravel codebase. Laravel's HTTP layer is built on Symfony HttpFoundation, not PSR-7. Using this package requires a PSR-7/HttpFoundation bridge, which adds conversion overhead, an extra failure mode at the boundary (headers, streams, uploaded files), and a second middleware mental model alongside Laravel's own Kernel middleware. Laravel already ships authentication, CORS, caching, redirects, and trusted-proxy handling natively.
  • The package is archived with a last release in September 2017. That is roughly PHP 7.1-era. There's no security response process, no PHP 8.x compatibility guarantee, and no maintainer to escalate to. A single CVE or a PHP minor bump turns this into an unplanned migration project.
  • You need active maintenance, security patching, or vendor support — i.e., anything customer-facing or handling auth tokens and CORS headers, where a stale implementation is a live security surface.
  • A modern alternative covers the same ground. For PSR-7/PSR-15 work, evaluate laminas/laminas-stratigility with middlewares/* handlers, or Slim's middleware set. For Laravel specifically, use framework middleware plus a maintained package for any gaps.

Bottom line: treat this as prior art, not a purchase. Adopt nothing; borrow the taxonomy.

How to Pitch It (Stakeholders)

For executives: There's a well-regarded 656-star PHP library that offers a ready-made set of HTTP utilities — login handling, CORS, caching, redirects, error pages. It's been archived and untouched since 2017. That means nobody is fixing bugs or security issues in it. Our recommendation is not to add it to our stack. We get the same capability from Laravel out of the box, and adding this would introduce a maintenance liability that would eventually cost more to remove than it saves. Expected savings from adoption: near zero. Expected migration cost if we adopted and later had to remove it: meaningful. Decision: do not adopt; use its design as a reference for our own middleware conventions.

For engineering: This package is PSR-7 only. Our framework uses Symfony HttpFoundation, so every request and response would need bridging at the pipeline boundary — extra allocations, extra edge cases around streams and file uploads, and two competing middleware systems in one codebase. It's also unmaintained since 2017, so PHP 8.x compatibility is unverified and there is no security patch path. The useful artifact here is the catalogue: it names the cross-cutting HTTP concerns we should explicitly own, and their composition model is a reasonable pattern for our internal middleware contract. Concretely: (1) do not add the dependency; (2) audit whether any current service already depends on it, and if so, scope a replacement using framework-native middleware; (3) capture the concern list as a checklist for our platform backlog.

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.
skyraptor/chatter
edlugz/sasapay
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