Download the PHP package ingenerator/microframework without Composer
On this page you can find all versions of the php package ingenerator/microframework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ingenerator/microframework
More information about ingenerator/microframework
Files in ingenerator/microframework
Package microframework
Short Description Extremely lightweight server framework for Cloud Run / Lambda etc
License BSD-3-Clause
Homepage https://github.com/ingenerator/microframework
Informations about the package microframework
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 & 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 & body).
It is designed & 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
composer require ingenerator/microframework
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).
Versioning policy
The package follows semver. For ease of maintenance, any given package version will only support a single PHP version and one minor version of each of the (small number of) composer dependencies.
It is expected that you may need to update your function code to the latest supported PHP / composer dependency version to be able to upgrade to a newer minor version of this package.
We may occasionally publish bugfix versions against an older version of the package to deal with security or severe bugs, but the majority of changes will only be applied to the current minor version.
Running tests
The package has some unit & integration tests which can be run with phpunit in the normal way.
We also provide a suite of blackbox tests to verify the overall behaviour of the package by making HTTP requests against
a distribution version of the package in a supported runtime environment. The test environment for this is quite
specific and is provisioned with uses docker compose
and some custom scripts to ensure that the system under test
has an exact copy of (only) the production code. See test/blackbox/README.md for more details
on how this works.
Contributing
Contributions are welcome but please contact us before you start work on anything : this is an opinionated package and we may have particular requirements / opinions that differ from yours.
Contributors
This package has been sponsored by inGenerator Ltd
Licence
Licensed under the BSD-3-Clause-Licence.