PHPackages                             fm-labs/flowphp - 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. fm-labs/flowphp

ActiveLibrary[Framework](/categories/framework)

fm-labs/flowphp
===============

PHP micro framework.

01PHPCI failing

Since Dec 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fm-labs/flowphp)[ Packagist](https://packagist.org/packages/fm-labs/flowphp)[ RSS](/packages/fm-labs-flowphp/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

flowphp
=======

[](#flowphp)

PHP micro framework

[![Build Status](https://camo.githubusercontent.com/c4c3554ed6cfe8e05f7f818ff97ca29fcb7e53333f9d397d58bb8e7c06659702/68747470733a2f2f7472617669732d63692e6f72672f666d2d6c6162732f666c6f777068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fm-labs/flowphp)

Requirements
------------

[](#requirements)

- php 7.0+

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

[](#installation)

```
$ cd /my/project/dir
$ composer require fm-labs/flowphp dev-master
```

Core Concepts
-------------

[](#core-concepts)

- `Global` - Manages singletons and global config. Provides static convenience helpers
- `Application` - Wires configuration, routes and middleware
- `Router` - Wires routes with handlers
- `Controller` - Processes server requests
- `Template` - Renders parameterized templates php-style
- `View` - Template + Layout template
- `Manager` - Manages named object instances of configured adapters
    - Database
    - Cache
    - Log
- `RouteHandler` - Any callable that MAY produce on of the following results:
    - `ResponseInterface`
    - `RouteHandler`: Will be invoked recursively with updated route context
    - `Closure`: Treated as a RouteHandler
    - `String`: Will be applied as response body
    - `Null`: Fallback handling. Not implemented yet
    - `Other`: Throws exception

Components
----------

[](#components)

### HTTP Stack

[](#http-stack)

- `Messages` (`Request` / `Response`) - Complaint to [PSR-7](https://www.php-fig.org/psr/psr-7),
- `Handler` - Complaint to [PSR-15](https://www.php-fig.org/psr/psr-15)
- `Factory` - Complaint to [PSR-17](https://www.php-fig.org/psr/psr-17)
- `Server` - for processing `HTTP Messages` using `HTTP Handlers` and `HTTP Factories`
- `MiddlewareQueue` - for processing multiple request handlers

### Application

[](#application)

The application is the main object we are working when building a project based on FlowPHP. All the wiring of the configuration, components and routes happens here.

Basically the application acts as a Service Container and Server Request Handler. The standard application has 3 main components: Configuration, Router and Middleware.

### Middleware

[](#middleware)

Built-in middlewares:

- `ErrorMiddleware` - Error handling
- `RoutingMiddleware` - Route matching and handling
- `RequestMapperMiddleware` - Build response based on request
- `CorsMiddleware` - CORS handling

### Routing

[](#routing)

Simple Router

- String templates
- Named args
- Optional args
- Pass args - Arguments that will be passed to the request handler as function arguments
- Custom regex for arg matching

### Templating

[](#templating)

Simple Template Engine

```
$template = (new Template())
    ->set('myvar', 'myval')
    ->setTemplate('mytemplate'); // resolves to ./templates/mytemplate.phtml

$html = $template->render();
```

Examples
--------

[](#examples)

Run tests
---------

[](#run-tests)

```
$ composer run-script test
// or
$ composer run-script test-verbose
// or
$ ./vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/
```

TODO
----

[](#todo)

- App: Controller
- App: Plugins
- Routing: Nested routers
- Template: Helpers
- Http/Server: Cookie support
- Http/Server: Uploaded files support

Changelog
---------

[](#changelog)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5556440?v=4)[fm-labs](/maintainers/fm-labs)[@fm-labs](https://github.com/fm-labs)

---

Top Contributors

[![fm-labs](https://avatars.githubusercontent.com/u/5556440?v=4)](https://github.com/fm-labs "fm-labs (28 commits)")

### Embed Badge

![Health badge](/badges/fm-labs-flowphp/health.svg)

```
[![Health](https://phpackages.com/badges/fm-labs-flowphp/health.svg)](https://phpackages.com/packages/fm-labs-flowphp)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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