PHPackages                             iyaki/the-no-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. iyaki/the-no-framework

ActiveLibrary[Framework](/categories/framework)

iyaki/the-no-framework
======================

Extremly minimal PHP framework

2.0.0(1y ago)011MITPHPPHP ^8.4CI passing

Since Jul 12Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/iyaki/TheNoFramework)[ Packagist](https://packagist.org/packages/iyaki/the-no-framework)[ RSS](/packages/iyaki-the-no-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (14)Versions (11)Used By (0)

TheNoFramework
==============

[](#thenoframework)

The goal of this library is to provide a simple way to implement PSR-15 compliant controllers (request handlers) in small projects that wouldn't take advantage of all the features of a bigger framework.

This package takes advantage of the PHP `auto_prepend_file` directive to avoid the need of a index.php acting as a front controller of your application, using TheNoFramework every controller is an entry point.

Features provided in this package:

- A PSR-15 request dispatcher (using [laminas-diactoros](https://github.com/laminas/laminas-diactoros)).
- Support to add PSR-15 middlewares.
- A emitter (using [laminas-httphandlerrunner](https://github.com/laminas/laminas-httphandlerrunner)) for the PSR-7 responses.
- **No** routing system provided.
- **No** exception handling provided.
- **No** authentication provided.
- **No** ORM or DBAL provided.
- **No** service container provided.

If you decide to use or implement a PSR-11 container (you probably should) this library can use it to allow the instantiation of complex request handlers and middlewares.

Install
-------

[](#install)

Via composer

```
composer require iyaki/the-no-framework
```

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

[](#configuration)

This library relies on a environment variables to discover and use a PSR-11 compliant service container:

The environment variables must be named `SERVICE_CONTAINER_WRAPPER` and store the path to the PSR-11 service container wrapper (a php file that returns an instance of `Psr\Container\ContainerInterface`).

If this variable is not provided the library will not have access to the service container and will work only with simple (no constructor arguments) request handlers.

Usage
-----

[](#usage)

bootstrap.php

```
