PHPackages                             innmind/framework - 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. [Framework](/categories/framework)
4. /
5. innmind/framework

ActiveLibrary[Framework](/categories/framework)

innmind/framework
=================

Http/Cli framework

4.0.1(2mo ago)52.4k4MITPHPPHP ~8.4CI passing

Since Jan 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Innmind/framework)[ Packagist](https://packagist.org/packages/innmind/framework)[ Docs](http://github.com/Innmind/framework)[ RSS](/packages/innmind-framework/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (18)Used By (4)

Framework
=========

[](#framework)

[![Build Status](https://github.com/Innmind/Framework/workflows/CI/badge.svg?branch=main)](https://github.com/Innmind/Framework/actions?query=workflow%3ACI)[![codecov](https://camo.githubusercontent.com/b7a981dfed6b461baabbe67d5b5f09a393f4b760b511d8f61f541b864a277bdc/68747470733a2f2f636f6465636f762e696f2f67682f496e6e6d696e642f4672616d65776f726b2f6272616e63682f646576656c6f702f67726170682f62616467652e737667)](https://codecov.io/gh/Innmind/Framework)[![Type Coverage](https://camo.githubusercontent.com/a27bc6125fed64736a747dd1146fc35819acdc45df77ab5e29212de4bd8029ea/68747470733a2f2f73686570686572642e6465762f6769746875622f496e6e6d696e642f4672616d65776f726b2f636f7665726167652e737667)](https://shepherd.dev/github/Innmind/Framework)

Minimalist HTTP/CLI framework that accomodate to simple applications to complex ones via middlewares.

The framework configuration is immutable and use a declarative approach.

Important

to correctly use this library you must validate your code with [`vimeo/psalm`](https://packagist.org/packages/vimeo/psalm)

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

[](#installation)

```
composer require innmind/framework
```

Usage
-----

[](#usage)

Take a look at the [documentation](docs/) for a more in-depth understanding of the framework.

### Http

[](#http)

The first step is to create the index file that will be exposed via a webserver (for example `public/index.php`). Then you need to specify the routes you want to handle.

Note

if you don't configure any route it will respond with `404 Not Found` with an empty body.

```
