Weave Code
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

Zend Http Laravel Package

zendframework/zend-http

Zend\Http is a PHP HTTP component for building and processing HTTP messages. It provides clients and adapters for making requests, plus request/response objects, headers, cookies, and utilities to work with URIs and HTTP-level features in your apps.

View on GitHub
Deep Wiki
Context7

Getting Started

The zendframework/zend-http package provides low-level HTTP message handling (requests, responses, headers, URIs) but is no longer actively maintained—its functionality has been migrated to laminas/laminas-http since 2020. Because this package is archived and receives no updates, start by installing laminas/laminas-http instead, as it’s the official successor and actively supported.

  • First use case: Use it for constructing or parsing HTTP messages outside of full-stack frameworks (e.g., in CLI tools, microservices, or legacy integrations).
  • Quick start:
    composer require laminas/laminas-http
    
    Then:
    use Laminas\Http\Request;
    $request = Request::fromString("GET /path HTTP/1.1\r\nHost: example.com\r\n\r\n");
    

Implementation Patterns

  • Manual HTTP message construction: Use Laminas\Http\Request/Response to programmatically build requests (e.g., for API clients) or parse raw HTTP strings (e.g., from logs or proxies).
  • Integration with non-MVC workflows: Great for middleware, job queues, or CLI utilities that need HTTP semantics without full frameworks.
  • Header manipulation: Leverage Laminas\Http\Headers for case-insensitive, typed header handling (e.g., Cookie, Authorization, Content-Type).
  • URI handling: Use Laminas\Http\Uri for URL validation, normalization, and relative URL resolution.
  • Legacy compatibility: If maintaining older Zend Framework applications, upgrade to Laminas HTTP to preserve same-day API compatibility.

Gotchas and Tips

  • Archived package warning: zendframework/zend-http is not updated for PHP 8+ and has known issues with modern PHP versions. Avoid new projects—migrate to laminas/laminas-http.
  • PHP version limits: The last Zend HTTP release (v2.8.0) supports only PHP ≤7.4. Use Laminas (v2.10+) for PHP 8.0–8.3 support.
  • DI mismatches: In Laravel, avoid coupling directly to this class in service bindings—abstract it behind a PSR-7/18 wrapper (e.g., nyholm/psr7) or Laravel’s Http client.
  • Debugging tip: Use Request::fromString() with $_SERVER-derived raw HTTP (e.g., SAPI input), but be wary of line ending differences (\r\n vs \n) in cross-platform environments.
  • Extension points: Extend Laminas\Http\Request to add app-specific behavior (e.g., signed request helpers), but prefer PSR-7 for interoperability with modern packages.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport