PHPackages                             lawngnome/phpdbg-fake-request - 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. lawngnome/phpdbg-fake-request

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

lawngnome/phpdbg-fake-request
=============================

A CLI script that will fake a HTTP request before delegating control to another PHP script

0.1.2(10y ago)3421[2 issues](https://github.com/LawnGnome/phpdbg-fake-request/issues)MITPHPPHP &gt;=7

Since May 26Pushed 10y agoCompare

[ Source](https://github.com/LawnGnome/phpdbg-fake-request)[ Packagist](https://packagist.org/packages/lawngnome/phpdbg-fake-request)[ RSS](/packages/lawngnome-phpdbg-fake-request/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

phpdbg request faker
====================

[](#phpdbg-request-faker)

This package provides an executable script that can be used with [phpdbg](http://phpdbg.com) to fake a web request.

[![Build Status](https://camo.githubusercontent.com/f851fa5d9afe90e5592f4af2de1fe16180ba187f936f1ffc8b07215621d462f0/68747470733a2f2f7472617669732d63692e6f72672f4c61776e476e6f6d652f7068706462672d66616b652d726571756573742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LawnGnome/phpdbg-fake-request)

Installation
------------

[](#installation)

```
composer require lawngnome/phpdbg-fake-request
```

Usage
-----

[](#usage)

To fake a `GET` request to `/` with `public/index.php` as the entry point:

```
./vendor/bin/fake-request GET / public/index.php
```

This will launch phpdbg. The script can then be run with phpdbg's `run`command:

```
run

```

### Populating `$_GET` and `$_POST`

[](#populating-_get-and-_post)

The `-g` and `-p` options allow for GET and POST variables to be sent:

```
./vendor/bin/fake-request GET / public/index.php -g 'page=2'
./vendor/bin/fake-request POST / public/index.php -p 'page=2'
```

Values do not need to be URL encoded.

### Headers

[](#headers)

Similarly, the `-H` option allows for HTTP headers to be sent:

```
./vendor/bin/fake-request GET / public/index.php -H 'X-Foo: bar'
```

### Cookies

[](#cookies)

The `-c` option allows cookies to be sent:

```
./vendor/bin/fake-request GET / public/index.php -c 'PHPSESSID=foo'
```

Known issues
------------

[](#known-issues)

### Arbitrary POST data is unsupported

[](#arbitrary-post-data-is-unsupported)

It is impossible at present to set the `php://input` stream up at runtime, so non-form POST data is not supported.

Feedback
--------

[](#feedback)

Please send issues and pull requests through [GitHub](https://github.com/LawnGnome/phpdbg-fake-request).

Acknowledgements
----------------

[](#acknowledgements)

This builds on top of the excellent [documentation](http://phpdbg.com/docs/mocking-webserver) on the phpdbg site and Symfony's equally excellent [console component](http://symfony.com/doc/current/components/console/index.html).

You can also e-mail me at , if you feel so inclined.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

3687d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/229984?v=4)[Adam Harvey](/maintainers/LawnGnome)[@LawnGnome](https://github.com/LawnGnome)

---

Top Contributors

[![LawnGnome](https://avatars.githubusercontent.com/u/229984?v=4)](https://github.com/LawnGnome "LawnGnome (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lawngnome-phpdbg-fake-request/health.svg)

```
[![Health](https://phpackages.com/badges/lawngnome-phpdbg-fake-request/health.svg)](https://phpackages.com/packages/lawngnome-phpdbg-fake-request)
```

###  Alternatives

[api-platform/openapi

Models to build and serialize an OpenAPI specification.

374.2M77](/packages/api-platform-openapi)[api-platform/json-schema

Generate a JSON Schema from a PHP class

294.3M59](/packages/api-platform-json-schema)

PHPackages © 2026

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