PHPackages                             ingenerator/microframework - 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. ingenerator/microframework

ActiveLibrary[Framework](/categories/framework)

ingenerator/microframework
==========================

Extremely lightweight server framework for Cloud Run / Lambda etc

v1.2.0(9mo ago)01.8k↓50%BSD-3-ClausePHPPHP ~8.4.0CI passing

Since Jul 16Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/ingenerator/microframework)[ Packagist](https://packagist.org/packages/ingenerator/microframework)[ Docs](https://github.com/ingenerator/microframework)[ RSS](/packages/ingenerator-microframework/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

microframework provides an extremely lightweight, opinionated, framework for simple HTTP request handlers (e.g. Cloud Run / Lambda / Cloud Functions style endpoints).

It provides:

- Basic bootstrapping including setting timezone &amp; locale.
- Error / Exception handling including logging and rendering a generic error response.
- Detection of unexpected output during execution / early header-sending.
- Request logging (including high-resolution latency).
- Rendering a PSR `ResponseInterface` object back to the client (including status code, headers &amp; body).

It is designed &amp; tested to run under apache v2.4 with mod\_php, mod\_prefork, and mod\_rewrite. Other runtime configurations may work but are not officially supported.

It does not - and will not - provide routing, runtime configuration management, dependency injection, HTML templating, middlewares, event dispatch or any similar features of more full-featured frameworks.

Getting started
===============

[](#getting-started)

`composer require ingenerator/microframework`

Handling requests
-----------------

[](#handling-requests)

Provision a PHP file as your entrypoint. This could be at `{Apache DocumentRoot}/index.php` or at any other location (e.g. you could place it in a subdirectory of a larger / more complex project alongside code that uses a different framework).

```
