PHPackages                             merophp/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. merophp/framework

ActiveLibrary[Framework](/categories/framework)

merophp/framework
=================

Just another small framework for web applications :-)

0.1.1-beta(3mo ago)0381↓50%MITPHPPHP &gt;=7.4

Since Mar 15Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Merophp/framework)[ Packagist](https://packagist.org/packages/merophp/framework)[ RSS](/packages/merophp-framework/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (2)Dependencies (19)Versions (3)Used By (0)

Introduction
============

[](#introduction)

Merophp is a mini framework for web applications. It is mainly designed as a tool for refactoring of legacy projects. This means you can integrate it and don't have to instantly do a big migration. Instead, you can do the migration over a long period of time.

It implements following standards:

- psr-4
- psr-7
- psr-12
- psr-15
- psr-16
- psr-17

It provides:

- a router
- an PSR-4 autoloader
- some cache classes
- a HTTP handling
- a bundle management
- object management with dependency injection
- an event manager
- a simple view engine

Installation
------------

[](#installation)

Via composer:

`composer require merophp/framework`Basic Usage
-----------

[](#basic-usage)

```
use Merophp\Framework\AppFactory;
use Merophp\Router\Routes\GetRoute;

require_once dirname(__DIR__).'/vendor/autoload.php';

//Create the app object
$app = AppFactory::create();

//Add routes to the router
$app->getRouter()->addRoutes(
    new GetRoute('/hello-world', function($request, $response){
        $response->getBody()->write('Hello World');
        return $response;
    })
);

//Run Forrest, run!
$app->start();

```

This is all you need to create a hello world app.

### The Bundle Concept

[](#the-bundle-concept)

You can use bundles aka plugins to structure and flexibilize your application. Merophp comes with a bundle interface for manipulation and extending of the request handling. Bundles should be separate composer packages to use composers autoloading and dependency management. Your bundles has to provide a bootstrapper class which implements the interface *Merophp\\BundleManager\\BundleBootstrapper\\BundleBootstrapperInterface* or extending the *Merophp\\Framework\\BundleManagement\\BundleBootstrapper\\AbstractBundleBootstrapper* class.

{your bundle path}/src/Bootstrapping/Bootstrapper.php:

```
namespace MyVendor\MyBundle\Bootstrapping;

use Merophp\Framework\BundleManagement\BundleBootstrapper\AbstractBundleBootstrapper;
use Merophp\Router\Routes\GetRoute;

class Bootstrapper extends AbstractBundleBootstrapper
{
    public function setup(){
        $this->app->getRouter()->addRoutes(
            new GetRoute('/hello-world', function($request, $response){
                $response->getBody()->write('Hallo World');
                return $response;
            })
        );
    }
    public function tearDown(){}
}

```

{your bundle path}/composer.json:

```
{
  "name": "my-vendor/my-bundle",
  "autoload": {
    "psr-4": {"MyVendor\\MyBundle\\": "src/"}
  },
  "require": {
	"merophp/framework":"*"
  }
}

```

Run: `composer update`

index.php:

```
use Merophp\Framework\AppFactory;

require_once dirname(__DIR__).'/vendor/autoload.php';

//Create the app object
$app = AppFactory::create();

//Register bundle
$app->registerBundle('MyVendor\\MyBundle');

//Run Forrest, run!
$app->start();

```

You can also register bundles inside the setup method of a bundles' bootstrapper.

### Using Controller Classes

[](#using-controller-classes)

In most cases you do not want to add a callback function to a route and use a controller with actions instead. Merophp provides you an easy-to-use controller integration:

Adding a route:

```
use MyVendor\MyBundle\Controller\MyCoolController;

$this->app->getRouter()->addRoutes(
     new GetRoute('/hello/{with-name}', [MyCoolController::class, 'myAction'])
);

```

{your bundle path}/src/Controller/MyCoolController.php

```
namespace MyVendor\MyBundle\Controller;

use Merophp\Framework\RequestControlling\AbstractController;

class MyCoolController extends AbstractController
{
    /**
     * @param string $name The param from the url
     */
    public function myAction($name)
    {
        //$arguments = $this->request->getParsedBody();

        $this->view->text('Hello '.$name);
    }
}

```

Sending an HTTP request with url https://{your-address}/hello/Martin will give you the response 'Hello Martin'.

You also can use dependency injection inside your controller, manipulate the response object and store information in the TransactionCache for the next request of the visitor.

About
-----

[](#about)

### Requirements

[](#requirements)

Merophp Framework works with PHP 7.4, 8.0 and 8.1. No further PHP extensions required.

### Support

[](#support)

Be aware, this is something like a just-for-fun project and there is no guaranty of support or further maintenance. There is also a high risk of volatility.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1426 days

Total

2

Last Release

98d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f873869f98cb1bdf9edb5847f987dfd216e5bc44f934d87875dca5ee20fbefb?d=identicon)[Robert.Becker](/maintainers/Robert.Becker)

---

Top Contributors

[![RobertBecker](https://avatars.githubusercontent.com/u/17496073?v=4)](https://github.com/RobertBecker "RobertBecker (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/merophp-framework/health.svg)

```
[![Health](https://phpackages.com/badges/merophp-framework/health.svg)](https://phpackages.com/packages/merophp-framework)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k509.9M17.0k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.3k86.3M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[spiral/framework

Spiral, High-Performance PHP/Go Framework

2.0k1.8M57](/packages/spiral-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
