https://github.com/labrador-kennel/framework
An HTTP microframework written on top of Labrador.
https://github.com/labrador-kennel/framework
amphp amphp-http php
Last synced: about 1 month ago
JSON representation
An HTTP microframework written on top of Labrador.
- Host: GitHub
- URL: https://github.com/labrador-kennel/framework
- Owner: labrador-kennel
- License: mit
- Created: 2015-01-15T02:53:21.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2025-11-27T14:52:56.000Z (4 months ago)
- Last Synced: 2026-01-14T12:33:55.642Z (2 months ago)
- Topics: amphp, amphp-http, php
- Language: PHP
- Homepage:
- Size: 681 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Labrador Framework
[](http://opensource.org/licenses/MIT)
[](https://github.com/labrador-kennel/http/releases/latest)
> Labrador is still in heavy development. A 1.0.0-alpha release is near but the API is still highly volatile and subject to change!
Labrador is a microframework built on-top of [Amphp](https://github.com/amphp) and [Annotated Container](https://github.com/cspray/annotated-container). It offers a non-traditional way of writing small-to-medium sized applications in PHP. Among its many features includes:
- Everything in pure PHP. Have a fully-featured web server up with `php app.php`
- Declarative approach to dependency injection
- Comprehensive, secure solution for handling configuration
- Asynchronous by default
- Robust, data-rich event system for knowing when things happen
- An easy-to-use HTTP and routing layer
If you're looking for a more complete skeleton to get started with writing Labrador-powered apps, you should check out [labrador-kennel/web-app](https://github.com/labrador-kennel/web-app); it is a skeleton for a complete app, including Docker setup, database, and templating.
## Install
Use [Composer](https://getcomposer.org) to install the library.
```
composer require labrador-kennel/framework
```
## Requirements
This is a step-by-step guide to the code you'll need to implement to get this framework serving HTTP requests. This is not meant to be a comprehensive guide on how to deploy in production, but how to get up and running on your local machine.
### Step 1: Logging
A critical step that MUST be completed, otherwise your application will not start up. To satisfy this requirement you must implement a `Labrador\Logging\LoggerFactory` and mark it as a service to be managed by the dependency injection container. Somewhere in your `src/` directory, or some other directory that is autoloaded and scaned by Annotated Container, write some code that resembles the following:
```php
TODO: Determine and document precise steps would need to result in a running app