Download the PHP package waffle-commons/http without Composer

On this page you can find all versions of the php package waffle-commons/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package http

Discord PHP Version Require PHP CI codecov Latest Stable Version Latest Unstable Version Total Downloads Packagist License

Waffle HTTP Component

Release: 0.1.0-beta6  |  CHANGELOG.md PSR Compliance: PSR-7 (HTTP Messages), PSR-17 (HTTP Factories)

A strict, immutable PSR-7/17 implementation tuned for FrankenPHP worker mode. No singletons, no superglobal touching outside the explicit GlobalsFactory. Streams are seekable-aware; the ResponseEmitter chunks bodies to avoid loading large payloads into memory.

πŸ“¦ Installation

🧱 Surface

Class PSR Role
Waffle\Commons\Http\Request PSR-7 Outbound HTTP request message.
Waffle\Commons\Http\ServerRequest PSR-7 Inbound HTTP request (the kernel input).
Waffle\Commons\Http\Response PSR-7 HTTP response message.
Waffle\Commons\Http\Stream PSR-7 Resource-backed StreamInterface.
Waffle\Commons\Http\Uri PSR-7 Immutable URI.
Waffle\Commons\Http\UploadedFile PSR-7 File-upload representation.
Waffle\Commons\Http\Abstract\AbstractMessage β€” Shared base for Request / ServerRequest / Response.
Waffle\Commons\Http\Factory\RequestFactory PSR-17 createRequest().
Waffle\Commons\Http\Factory\ServerRequestFactory PSR-17 createServerRequest().
Waffle\Commons\Http\Factory\ResponseFactory PSR-17 createResponse().
Waffle\Commons\Http\Factory\StreamFactory PSR-17 createStream(), createStreamFromFile(), createStreamFromResource().
Waffle\Commons\Http\Factory\UriFactory PSR-17 createUri().
Waffle\Commons\Http\Factory\UploadedFileFactory PSR-17 createUploadedFile().
Waffle\Commons\Http\Factory\GlobalsFactory β€” Implements GlobalsFactoryInterface: builds a PSR-7 ServerRequest from $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES, and php://input.
Waffle\Commons\Http\Emitter\ResponseEmitter β€” Implements ResponseEmitterInterface: sends status line, headers and chunked body.

πŸš€ Bootstrap a server request

The factory takes an optional (callable(): StreamInterface) $bodyStreamFactory so tests can inject a synthetic body without touching php://input:

Security note. GlobalsFactory does not enforce trusted hosts. Host-header anti-poisoning is handled one layer up by Waffle\Commons\Pipeline\Middleware\TrustedHostMiddleware, which sits between ErrorHandlerMiddleware and CoreRoutingMiddleware in the PSR-15 stack.

πŸ“€ Emit a response

The emitter:

🐘 PHP 8.5 features used

🧭 Architectural boundary (mago guard)

An active dependency perimeter is enforced on every CI run by vendor/bin/mago guard (bundled into composer mago; zero baselines). The rules live in mago.toml under [guard.perimeter] β€” a forbidden use statement fails the build, not a reviewer.

Production code under Waffle\Commons\Http may depend only on:

Test code under WaffleTests\Commons\Http is unrestricted (@all); the php-mock bootstrap fixtures noted under Testing are listed in [guard].excludes because they intentionally re-declare the production namespace. Structural rules are guarded too: interfaces must be named *Interface, Exception\** classes must end in *Exception, and any Enum\** namespace may hold only enum declarations.

Contract-first, component-agnostic by construction: components compose through waffle-commons/contracts, never directly through one another.

πŸ§ͺ Testing

Mock-bootstrap files under tests/src/StreamTest.php, tests/src/UploadedFileTest.php, tests/src/Factory/StreamFactoryTest.php, and tests/src/Emitter/ResponseEmitterTest.php intentionally declare the production namespace to override built-in PHP functions via php-mock-phpunit. They are listed in mago.toml [guard].excludes for that reason.

πŸ“š Documentation

Full guides live in the central DiΓ‘taxis documentation tree:

πŸ“„ License

MIT β€” see LICENSE.md.


All versions of http with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
psr/http-message Version ^2.0
psr/http-factory Version ^1.1
waffle-commons/contracts Version self.version
waffle-commons/utils Version self.version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package waffle-commons/http contains the following files

Loading the files please wait ...