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 Laravel Package

yiisoft/http

Lightweight HTTP utilities for PHP from the Yii ecosystem, offering constants for methods, status codes, headers, and MIME types plus helpers for PSR-7 messages. Useful for building consistent HTTP layers without a full framework.

Deep Wiki
Context7

Product Decisions This Supports

  • Coding standards and review policy: supports a decision to ban raw numeric status codes and string method literals across services, replacing them with named constants (Status::NOT_FOUND, Method::POST). This is a linting/standards decision, not a product feature, but it measurably reduces a class of API defects where the wrong code reaches a customer.
  • Framework-decoupling strategy: because this is framework-neutral PHP rather than Laravel-specific, it supports decisions about keeping domain and transport code portable — relevant if we are planning service extraction, a shared internal PHP "foundations" package, or an eventual migration off Laravel. It gives Laravel and non-Laravel services a common vocabulary.
  • Build vs. buy for micro-utilities: informs whether the platform team owns a constants/enums package or leans on vendor code. At 29 stars and a constants-only surface, this is firmly "buy (or vendor), don't build a fork we have to maintain."
  • API contract and roadmap hygiene: supports adopting status semantics in our public API contract — 429 for rate limiting, 410 for retired endpoints, 308 for permanent redirects — without waiting on a framework upgrade cycle.
  • Use cases it enables: internal API gateways, SDKs, webhook dispatchers, and health-check endpoints that should not pull in a full framework HTTP layer just to answer "what is a 422?"
  • What it does not support: this package should not influence roadmap prioritization, differentiation, or customer-facing commitments. It is implementation hygiene, not a capability.

When to Consider This Package

Consider it when:

  • You need a tiny, permissively licensed (BSD-3-Clause) set of HTTP method and status constants shared across both Laravel and non-Laravel PHP services.
  • You are standardizing constants/enums in a monorepo and want zero runtime overhead and no meaningful transitive dependency footprint.
  • You are in or interoperating with the Yii ecosystem, where this is idiomatic and maintained alongside Yiisoft packages — the late-2025 release cadence suggests active upkeep.
  • You want a stable internal contract for status codes in a shared library and are willing to pin the version and vendor it.

Look elsewhere when:

  • You need PSR-7/PSR-17 message implementations, middleware, HTTP clients, routing, or request/response objects. This package is constants-only; it will not meet that need at any scope.
  • Your organization requires vendor SLAs, broad adoption evidence, or maintainer depth for dependency approval. 29 stars is thin, and bus factor is a genuine risk.
  • You are Laravel-only. Illuminate\Http\Response, Symfony's Response constants, or PHP 8.1 backed enums you define yourself are equally capable and remove a dependency entirely.
  • You need typed enums with tryFrom() semantics, IDE autocomplete guarantees, or first-class static analysis integration — hand-rolled enums may serve better.

How to Pitch It (Stakeholders)

For executives: This is a low-cost, low-risk hygiene dependency under a permissive BSD-3-Clause license. It reduces a specific, real defect class — incorrect HTTP status codes reaching customers — at essentially zero operational cost and no measurable performance impact. It is not a strategic bet and has no roadmap impact; the small community footprint (29 stars) means we should treat it as replaceable commodity code, not a platform commitment.

For engineering: Adopt it as a thin constants layer to standardize HTTP methods and status codes across PHP services, particularly where we want the same vocabulary inside and outside Laravel. The trade-off is honest: it duplicates what Laravel and Symfony already ship, so the win is portability and readability, not new capability. Because maintenance depth is shallow, we recommend pinning the version, wrapping imports behind our own façade (or forking outright if we depend on it broadly), and pairing adoption with a lint rule banning raw numeric status codes. If the team is Laravel-only, define PHP enums in-house and skip the dependency.

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