PHPackages                             cryodrift/fakepost - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. cryodrift/fakepost

ActiveLibrary[Testing &amp; Quality](/categories/testing)

cryodrift/fakepost
==================

Fake POST from file to simulate incoming requests for testing.

0.1.30(5mo ago)003MITPHPPHP &gt;=8.4

Since Jan 15Pushed 5mo agoCompare

[ Source](https://github.com/cryodrift/fakepost)[ Packagist](https://packagist.org/packages/cryodrift/fakepost)[ RSS](/packages/cryodrift-fakepost/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (30)Used By (3)

cryodrift/fakepost
==================

[](#cryodriftfakepost)

Overview
--------

[](#overview)

The Fakepost middleware is a utility for simulating POST requests by loading data from files. It's primarily designed for testing and development purposes, allowing developers to easily mock POST requests without needing to set up complex test environments.

Components
----------

[](#components)

### Cli Handler

[](#cli-handler)

The `Cli.php` component is the main handler that processes POST requests in CLI mode. It:

- Intercepts POST requests
- Parses POST data from files
- Sets the parsed data as request variables

### ParamPost

[](#parampost)

The `ParamPost.php` component extends the system's `ParamFile` class to handle POST parameters. It:

- Loads POST data from files
- Handles special cases like empty values

Usage
-----

[](#usage)

### Command Line

[](#command-line)

The middleware is automatically registered when running in CLI mode. To use it:

1. Create a text file with your POST data in the format:

    ```
    key1: value1
    key2: value2

    ```
2. Pass this file as a parameter to your CLI command:

    ```
    php index.php /your/endpoint -post=path/to/postdata.txt

    ```
3. The middleware will parse the file and set the key-value pairs as POST variables in the request.

### Example

[](#example)

Given a file `postdata.txt` with the content:

```
username: testuser
password: testpass

```

Running:

```
php index.php /login -post=postdata.txt

```

Will simulate a POST request to `/login` with the username and password parameters.

Configuration
-------------

[](#configuration)

The middleware is automatically registered in CLI mode through the `config.php` file. No additional configuration is required for basic usage.

Integration
-----------

[](#integration)

The Fakepost middleware integrates with the system's request handling pipeline and works seamlessly with other components that process POST data.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance71

Regular maintenance activity

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

29

Last Release

166d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/240886628?v=4)[cryodrift](/maintainers/cryodrift)[@cryodrift](https://github.com/cryodrift)

### Embed Badge

![Health badge](/badges/cryodrift-fakepost/health.svg)

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

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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