PHPackages                             papimod/common - 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. papimod/common

ActiveLibrary

papimod/common
==============

Module Papi

v2.1.1(5mo ago)0231Apache-2.0PHP

Since Dec 18Pushed 5mo agoCompare

[ Source](https://github.com/4uruanna/papimod-common)[ Packagist](https://packagist.org/packages/papimod/common)[ RSS](/packages/papimod-common/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (5)Used By (1)

Common Papi Module
==================

[](#common-papi-module)

[![](https://camo.githubusercontent.com/4893040bcf8e285d2895bb07a0985e48a3ddc545ff0abdeb11622706315de0f0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e352d3737374242343f6c6f676f3d706870)](https://camo.githubusercontent.com/4893040bcf8e285d2895bb07a0985e48a3ddc545ff0abdeb11622706315de0f0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e352d3737374242343f6c6f676f3d706870)[![](https://camo.githubusercontent.com/1a63c4971998a5b902b01583c76051a8ee8deec80235c1f6c8b5bd8e78725680/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d322d3838353633303f6c6f676f3d636f6d706f736572)](https://camo.githubusercontent.com/1a63c4971998a5b902b01583c76051a8ee8deec80235c1f6c8b5bd8e78725680/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d322d3838353633303f6c6f676f3d636f6d706f736572)

Description
-----------

[](#description)

Help configuring middlewares provided by Slim in your [papi](https://github.com/4uruanna/papi).

Prerequisites Modules
---------------------

[](#prerequisites-modules)

- [Papimod/Dotenv](https://github.com/4uruanna/papimod-dotenv)

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

[](#configuration)

### `ALLOW_BODY_PARSING` (.ENV)

[](#allow_body_parsing-env)

RequiredNoTypeintDescriptionAllow [body parsing middleware](https://www.slimframework.com/docs/v4/middleware/body-parsing.html)Default1### `ALLOW_ROUTING` (.ENV)

[](#allow_routing-env)

RequiredNoTypeintDescriptionAllow [routing middleware](https://www.slimframework.com/docs/v4/middleware/routing.html)Default1Definitions
-----------

[](#definitions)

- [(middleware) BodyParsingMiddleware](./source/middleware/BodyParsingMiddleware.php)
- [(middleware) RoutingMiddleware](./source/middleware/RoutingMiddleware.php)

Usage
-----

[](#usage)

### Module

[](#module)

You can add the following options to your `.env` file:

```
ALLOW_ROUTING=1
ALLOW_BODY_PARSING=1
```

Import the module when creating your application:

```
require __DIR__ . "/../vendor/autoload.php";

use Papi\PapiBuilder;
use Papimod\Dotenv\DotEnvModule;
use Papimod\Common\CommonModule;
use function DI\create;

$builder = new PapiBuilder();

$builder
    ->setModule(
        DotEnvModule::class, # Prerequisite
        CommonModule::class
    )
    ->build()
    ->run();
```

### Custom implementation

[](#custom-implementation)

You can also import only the items of your choice:

```
require __DIR__ . "/../vendor/autoload.php";

use Papi\PapiBuilder;
use Papimod\Dotenv\DotEnvModule;
use Papimod\Common\middleware\RoutingMiddleware;
use function DI\create;

$builder = new PapiBuilder();

$builder
    ->setMiddleware(RoutingMiddleware::class)
    ->build()
    ->run();
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance73

Regular maintenance activity

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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 ~1 days

Total

3

Last Release

150d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22fd4dcec379ce472b56c0f51528fa61ce156e5063756abcce648361770fc839?d=identicon)[4uruanna](/maintainers/4uruanna)

---

Top Contributors

[![4uruanna](https://avatars.githubusercontent.com/u/179627698?v=4)](https://github.com/4uruanna "4uruanna (11 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/papimod-common/health.svg)

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

PHPackages © 2026

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