hyperf/http-server
Hyperf HTTP Server provides a high-performance, coroutine-based HTTP server for the Hyperf framework, built on Swoole or Swow. It offers PSR-7/PSR-15 middleware support, powerful routing, annotation-driven controllers, and fast request handling for scalable PHP microservices.
What this package actually is. hyperf/http-server is the HTTP server component of Hyperf, a coroutine-native PHP framework built on Swoole/Swow. It is not a Laravel package: there is no service provider, no publishable config, no facade, and no integration with Laravel's HTTP kernel, router, middleware pipeline, or container. It supplies the server bootstrap, request/response bridging (PSR-7/PSR-17), and dispatcher wiring that Hyperf's own framework layer consumes.
What v3.2.0 tells us. The release notes are a framework-wide changelog, not a component changelog. There is not a single http-server-specific entry in a 60+ item release note. This is decisive evidence for the core finding: the package has no independent surface, no independent versioning, and no independent change review. It ships as a passenger on the Hyperf monorepo train.
The release is a hard-breaking minor:
| Area | Change | Impact on an adopter |
|---|---|---|
| Runtime floor | PHP >=8.2 |
Base image and CI matrix change; may diverge from the Laravel app's floor |
| Carbon | v3 / createFromTimestamp() timezone, diffInDays() no longer absolute |
Silent semantic drift in any date logic; the release note's "break usage" and "correct usage" snippets are identical, so the migration guidance is unusable |
async-queue |
JobInterface::getQueueName() → getPoolName() |
Source-level rename in every custom job |
logger |
Config restructured to default + channels |
Non-negotiable config rewrite |
cache |
Config restructured to default + stores |
Non-negotiable config rewrite |
swow |
Manual ResponseEmitterInterface binding now required |
Silent misconfiguration risk under Swow |
| Dependencies | Symfony `^6 | |
| Removals | laminas/laminas-mime, CacheableSupportsMethodInterface, JobMessage BC shim, assorted deprecated APIs |
Every removal is a second breaking surface beyond the headline list |
| PHP 8.4 | fgetcsv/fputcsv must now pass escape: '' |
Forward-compat footgun for anyone targeting 8.4 |
Architecture fit — poor as a Laravel dependency, unchanged. The component assumes:
#[Inject] semantics.Hyperf\Context\Context), not a fresh PHP-FPM process.Config, EventDispatcher, and Server abstractions already registered.Laravel's request lifecycle is synchronous and per-request; its container is not coroutine-aware. Grafting this component in means running a second application kernel alongside Laravel's, which is an architecture change, not an integration.
An under-noticed strategic signal. A meaningful share of v3.2.0's "Added" list is Hyperf re-implementing conveniences Laravel already has: Htmlable for responses, toJson on Jsonable, Macroable on Context, Pipeline::finally(), Collection::shift()/pop() multi-item, Arr::partition()/reject(), Fluent improvements. For a Laravel shop this is a direct cost signal: adopting Hyperf means rebuilding ergonomics you get for free, and maintaining them forward as the framework catches up.
Integration feasibility: low for the stated stack. Realistic options:
| Option | Effort | Outcome |
|---|---|---|
| Drop-in into Laravel | N/A | Not possible; no Laravel bindings exist |
| Standalone sidecar process using this component | High | Two runtimes, two containers, duplicated auth/routing/logging |
| Adopt Hyperf as a separate service | High | Viable, but this package is then incidental to a framework decision — and v3.2.0 confirms the framework moves in breaking steps |
| Use Laravel Octane instead | Low–Medium | Same performance goal, native to the stack, and unaffected by this changelog |
The only defensible reason to touch this package remains: the organisation is already committing to Hyperf for a new coroutine-based service. In that case it is a default dependency, not a selection.
Technical risk — revised upward.
http-server patch without inheriting the Carbon v3 semantics change and the logger/cache config rewrites.Key questions for the team. (Q1–Q3 revised in light of v3.2.0.)
getQueueName() → getPoolName() rename — and on what schedule? If the answer is "nobody yet," the evaluation is premature.escape change been audited? And does the service use Swow, in which case the ResponseEmitter binding is a required config step that fails silently if omitted?Stack fit. None at the application layer. Laravel and Hyperf are parallel ecosystems with incompatible lifecycles. The component's natural home is a new Hyperf service within a polyglot PHP estate, communicating with Laravel services over HTTP or a message bus.
Migration path. There is still no incremental path from a Laravel app to this package. v3.2.0 adds a mandatory pre-step: any PoC config written before this release must be rewritten to the new logger and cache schemas. Revised sequencing:
ResponseEmitter binding documented if Swow is used.Compatibility. PHP ≥8.2 is now a hard floor (verify against the specific Hyperf 3.2 patch). Symfony ^6||^7, phpunit ^11, nikic/php-parser 5.6, Guzzle ^7, ES ^8||^9, protobuf ^3.6.1||^4.2. Swoole 5.x or Swow (with the required ResponseEmitterInterface binding). Strict PSR-7/15/17 compliance. Middleware, logging, and tracing must be re-implemented against Hyperf contracts; Laravel middleware does not port. Note the likely divergence: if the Laravel estate is on PHP 8.1 or Symfony 5, the Hyperf sidecar needs its own base image and cannot share the app image — a standing build-and-patch cost for a single service.
Sequencing recommendation. Unchanged in shape, tighter on scope: a spike with a kill gate, capped at 2–3 engineer-weeks, pinned to Hyperf 3.2.x. Success criteria: sustained throughput under a realistic mix, zero coroutine-context leaks over a 24-hour soak, a documented operational runbook, and a completed dry-run of one dependency upgrade end-to-end (to measure the real migration tax rather than estimate it). Absent all four, retain Laravel + Octane and revisit in 12 months.
Maintenance. The package has no independent release cadence — it versions with Hyperf, and v3.2.0 is the proof: a framework-wide breaking release with zero component-specific entries. Upgrading means upgrading the framework, the DI container, the config schemas, and the runtime together. Revised budget: one coordinated migration per Hyperf minor is no longer sufficient — assume a multi-day migration per minor and a multi-week project per major. v3.2.0 alone requires: config rewrites (logger, cache), a source rename (getPoolName()), a Carbon v3 semantics audit, a PHP floor bump, a Symfony 6/7 and phpunit 11 alignment, and verification of five-plus removal sites. Low star count means no community patches; upstream issues are the only channel.
Support. MIT, community-supported, no vendor SLA. Internal ownership must be explicit: someone needs deep Swoole fluency and enough Hyperf fluency to read source because the release notes are unreliable (the identical before/after Carbon snippets are a concrete example). Identify that person before commitment. Additionally: the PHP 8.4 CSV escape warning and the silent-if-omitted Swow binding both argue for a documented internal "Hyperf upgrade checklist" rather than relying on upstream docs.
Scaling. Unchanged and still strong on paper: fixed worker pool, no per-request bootstrap, efficient connection handling, horizontal scale by adding pods. Capacity planning shifts from CPU-per-request to worker-count × memory-per-worker, and long-lived workers accumulate state. Right-sizing worker_num, max-request-per-worker, and pool sizes is a first-class operational concern with no PHP-FPM analogue. One genuine v3.2.0 positive: async-queue consumers can now auto-register from configuration instead of manual processes.php entries, which removes a recurring source of deploy drift.
Failure modes to instrument for.
sleep) stalls the entire worker. Detect via event-loop lag metrics.ResponseEmitter binding do not fail loudly; they fail as missing logs, cache misses, or broken response emission. Add a post-upgrade smoke test asserting each channel and store resolves.diffInDays() no longer defaults to absolute, and timezone resolution for createFromTimestamp() changed. This surfaces as subtly wrong business logic, not as an error. Audit every date computation on the service boundary.Ramp-up. 4–8 weeks before a mid-level PHP engineer is productive, considerably longer before anyone debugs production incidents unaided. v3.2.0 adds a second ramp curve: even a fluent Hyperf engineer must re-learn the logger, cache, Carbon v3, and async-queue surfaces. The mental-model shift (coroutines, shared state, non-blocking contracts) remains the dominant cost, not the API. Plan a formal internal enablement track and pair the first service with someone who has Swoole production experience.
Bottom line. v3.2.0 does not change the verdict — it hardens it. For a Laravel shop, hyperf/http-server is not an integration candidate; it is a signal that the team is contemplating a framework-level shift, and this release quantifies what that shift costs per minor. The TPM recommendation: keep it out of the dependency graph, validate the performance requirement against Laravel Octane (untouched by every item in this changelog), and reopen only if a deliberate, separately-staffed Hyperf service is funded — with the v3.2.0 breaking-change list accepted up front as the recurring price of admission.
How can I help you explore Laravel packages today?