PHPackages                             aura/web - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. aura/web

ActiveLibrary[HTTP &amp; Networking](/categories/http)

aura/web
========

Provides web Request and Response objects for use by web controllers and actions. These are representations of the PHP web environment, not HTTP request and response objects proper.

2.2.1(2y ago)83565.1k↓42.1%24[1 issues](https://github.com/auraphp/Aura.Web/issues)11BSD-2-ClausePHPPHP &gt;=5.3.0CI failing

Since Nov 30Pushed 2y ago13 watchersCompare

[ Source](https://github.com/auraphp/Aura.Web)[ Packagist](https://packagist.org/packages/aura/web)[ Docs](https://github.com/auraphp/Aura.Web)[ RSS](/packages/aura-web/feed)WikiDiscussions 2.x Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (17)Used By (11)

Aura.Web
========

[](#auraweb)

Provides web *Request* and *Response* objects for use by web controllers and actions. These are representations of the PHP web environment, not HTTP request and response objects proper.

Foreword
--------

[](#foreword)

### Installation

[](#installation)

This library requires PHP 5.3 or later; we recommend using the latest available version of PHP as a matter of principle. It has no userland dependencies.

It is installable and autoloadable via Composer as [aura/web](https://packagist.org/packages/aura/web).

Alternatively, [download a release](https://github.com/auraphp/Aura.Web/releases) or clone this repository, then require or include its *autoload.php* file.

### Quality

[](#quality)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a5b5f98cbcc42639cc9516d5cb20d1f01073acf1a8ab84eca549dfa4ce93fc05/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f617572617068702f417572612e5765622f6261646765732f7175616c6974792d73636f72652e706e673f623d322e78)](https://scrutinizer-ci.com/g/auraphp/Aura.Web/)[![codecov](https://camo.githubusercontent.com/c9dce24bf57e355032b68ed0b265be3f2826d8bc1ec665a5d01a5ee604b3afb1/68747470733a2f2f636f6465636f762e696f2f67682f617572617068702f417572612e5765622f6272616e63682f322e782f67726170682f62616467652e7376673f746f6b656e3d554153446f754c787963)](https://codecov.io/gh/auraphp/Aura.Web)[![Continuous Integration](https://github.com/auraphp/Aura.Web/actions/workflows/continuous-integration.yml/badge.svg?branch=2.x)](https://github.com/auraphp/Aura.Web/actions/workflows/continuous-integration.yml)

To run the unit tests at the command line, issue `composer install` and then `./vendor/bin/phpunit` at the package root. This requires [Composer](http://getcomposer.org/) to be available as `composer`.

This library attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

### Community

[](#community)

To ask questions, provide feedback, or otherwise communicate with the Aura community, please join our [Google Group](http://groups.google.com/group/auraphp), follow [@auraphp on Twitter](http://twitter.com/auraphp), or chat with us on #auraphp on Freenode.

Getting Started
---------------

[](#getting-started)

### Instantiation

[](#instantiation)

First, instantiate a *WebFactory* object, then use it to create *Request* and *Response* objects.

```

```

Note that if `jit-globals` is turned on, merely passing `$GLOBALS` will not work properly. In this case, use `compact()` to pass the needed values. For example:

```

```

### Request and Response Objects

[](#request-and-response-objects)

Because each object contains so much functionality, we have split up the documentation into a [Request](README-REQUEST.md) page and a [Response](README-RESPONSE.md) page.

By way of overview, the *Request* object has these sub-objects ...

- [$request-&gt;cookies](README-REQUEST.md#superglobals) for $\_COOKIES
- [$request-&gt;env](README-REQUEST.md#superglobals) for $\_ENV
- [$request-&gt;files](README-REQUEST.md#superglobals) for $\_FILES
- [$request-&gt;post](README-REQUEST.md#superglobals) for $\_POST
- [$request-&gt;query](README-REQUEST.md#superglobals) for $\_GET
- [$request-&gt;server](README-REQUEST.md#superglobals) for $\_SERVER
- [$request-&gt;client](README-REQUEST.md#client) for the client making the request
- [$request-&gt;content](README-REQUEST.md#content) for the raw body of the request
- [$request-&gt;headers](README-REQUEST.md#headers) for the request headers
- [$request-&gt;method](README-REQUEST.md#method) for the request method
- [$request-&gt;params](README-REQUEST.md#params) for path-info parameters
- [$request-&gt;url](README-REQUEST.md#url) for the request URL

... and the *Response* object has these sub-objects:

- [$response-&gt;status](README-RESPONSE.md#status) for the status code, status phrase, and HTTP version
- [$response-&gt;headers](README-RESPONSE.md#headers) for non-cookie headers
- [$response-&gt;cookies](README-RESPONSE.md#cookies) for cookie headers
- [$response-&gt;content](README-RESPONSE.md#content) for describing the response content, and for convenience methods related to content type, charset, disposition, and filename
- [$response-&gt;cache](README-RESPONSE.md#cache) for convenience methods related to cache headers
- [$response-&gt;redirect](README-RESPONSE.md#redirect) for convenience methods related to Location and Status

Once you have built a *Response* you can send it with any HTTP mechanism you prefer, [including plain PHP](README-RESPONSE.md#sending-the-response).

Be sure to read the [Request](README-REQUEST.md) and [Response](README-RESPONSE.md) pages for more detailed information.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~257 days

Recently: every ~281 days

Total

17

Last Release

851d ago

Major Versions

1.0.2 → 2.0.0-beta12014-01-09

1.0.3 → 2.0.02014-10-04

1.x-dev → 2.0.42016-10-03

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0-beta1PHP &gt;=5.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25754?v=4)[Paul M. Jones](/maintainers/pmjones)[@pmjones](https://github.com/pmjones)

![](https://www.gravatar.com/avatar/29dba0e6add8d89fd3fc6126b213d5d2f57538ea78318963025d6ea98db34161?d=identicon)[harikt](/maintainers/harikt)

---

Top Contributors

[![harikt](https://avatars.githubusercontent.com/u/120454?v=4)](https://github.com/harikt "harikt (40 commits)")[![galactic-void](https://avatars.githubusercontent.com/u/40361?v=4)](https://github.com/galactic-void "galactic-void (17 commits)")[![ralouphie](https://avatars.githubusercontent.com/u/1500005?v=4)](https://github.com/ralouphie "ralouphie (6 commits)")[![darthyody](https://avatars.githubusercontent.com/u/6844121?v=4)](https://github.com/darthyody "darthyody (2 commits)")[![jelofson](https://avatars.githubusercontent.com/u/497112?v=4)](https://github.com/jelofson "jelofson (2 commits)")[![pmjones](https://avatars.githubusercontent.com/u/25754?v=4)](https://github.com/pmjones "pmjones (2 commits)")[![proggeler](https://avatars.githubusercontent.com/u/18281353?v=4)](https://github.com/proggeler "proggeler (2 commits)")[![zkwbbr](https://avatars.githubusercontent.com/u/45949485?v=4)](https://github.com/zkwbbr "zkwbbr (2 commits)")[![TimeToogo](https://avatars.githubusercontent.com/u/689898?v=4)](https://github.com/TimeToogo "TimeToogo (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")[![dhrrgn](https://avatars.githubusercontent.com/u/149921?v=4)](https://github.com/dhrrgn "dhrrgn (1 commits)")[![garoevans](https://avatars.githubusercontent.com/u/1016708?v=4)](https://github.com/garoevans "garoevans (1 commits)")[![dshafik](https://avatars.githubusercontent.com/u/58074?v=4)](https://github.com/dshafik "dshafik (1 commits)")[![iansltx](https://avatars.githubusercontent.com/u/472804?v=4)](https://github.com/iansltx "iansltx (1 commits)")[![jakeasmith](https://avatars.githubusercontent.com/u/234832?v=4)](https://github.com/jakeasmith "jakeasmith (1 commits)")

---

Tags

auracookie-headercookiesheadersphprequestresponseresponserequest

### Embed Badge

![Health badge](/badges/aura-web/health.svg)

```
[![Health](https://phpackages.com/badges/aura-web/health.svg)](https://phpackages.com/packages/aura-web)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.0k1.1B6.9k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k747.1M2.7k](/packages/psr-http-factory)[fig/http-message-util

Utility classes and constants for use with PSR-7 (psr/http-message)

39397.5M313](/packages/fig-http-message-util)[nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

49119.8M601](/packages/nette-http)[psr/http-server-handler

Common interface for HTTP server-side request handler

180114.7M1.2k](/packages/psr-http-server-handler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
