This package is abandoned and no longer maintained. No replacement package was suggested.

The PHP micro-framework

Installs: 48

Dependents: 0

Suggesters: 0

Stars: 24

Watchers: 4

Forks: 1

Open Issues: 0


v1.2.1 2015-03-29 14:27 UTC


Build Status Scrutinizer Code Quality Code Coverage

For licence details see Documentation is available on Wiki :


Welcome to Moss a micro framework, that provides basic tools for building simple web pages or APIs it can also handle something bigger.

So what's the difference between other micro-frameworks?

Moss isn't some kind of cropped full stack framework, that was cut down to fit into micro segment.

Moss was developed as a solution with small footprint, that is easy to extend and with as little dependencies as possible - and still simple to use.

Moss also wants to be fashionable and follows trends: dependency injection, event dispatching, request-response objects, clean code. Not because its fancy to be trendy, but because it makes sense and code benefits from them.


  • fully grown Router (not powerful but working :) ),
  • Request and Response objects (got http auth, and easy header management),
  • flash messages
  • dependency injection container
  • event dispatcher with AOP
  • closure and class controllers (that can be organized into bundles with fluent directory structure),
  • simple view that can be easily extended with bridge to use Twig (as package in composer)
  • and clean code
  • and more


Documentation is available on Wiki :


Add to composer.json:

        "require": {
            "moss/framework": "*"

Or from console

    php composer.phar require moss/framework

Then create entry file, eg ./web/index.php containing:

    use Moss\Config\Config;
    use Moss\Container\ContainerInterface;
    use Moss\Http\Response\Response;
    use Moss\Kernel\App;

    require __DIR__ . '/vendor/autoload.php';

    $app = new App(new Config());
    $app->route('main', '/', function () { return new Response('Hello World'); });

Or download simple sample app from github


If you want to submit fix or some other enhancements, feel free to do so. Whenever you find a bug it would be nice if you submit it. And if you submit fix - this would be truly amazing!

How to Contribute

  • Fork;
  • Create a new branch for each feature/improvement/issue;
  • Send a pull request from branch

Style Guide

All pull requests must adhere to the PSR-2 standard. All pull requests should be accompanied by passing PHPUnit tests. Add phpDocs to all methods, including at least a description, all @param, @return and @throws declaration