PHPackages                             marmelab/microrest - 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. [API Development](/categories/api)
4. /
5. marmelab/microrest

AbandonedArchivedLibrary[API Development](/categories/api)

marmelab/microrest
==================

Silex Provider that generates REST API from a RAML description file

18532222[4 PRs](https://github.com/marmelab/microrest.php/pulls)PHP

Since Sep 27Pushed 7y ago28 watchersCompare

[ Source](https://github.com/marmelab/microrest.php)[ Packagist](https://packagist.org/packages/marmelab/microrest)[ RSS](/packages/marmelab-microrest/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

  [![archived](https://camo.githubusercontent.com/742c4e1d1cee10950fdbcf8cec4cdfb2f650d7d83c0fe0d065a460c50515f2be/68747470733a2f2f63646e6a732e636c6f7564666c6172652e636f6d2f616a61782f6c6962732f6f637469636f6e732f382e352e302f7376672f617263686976652e737667)](https://camo.githubusercontent.com/742c4e1d1cee10950fdbcf8cec4cdfb2f650d7d83c0fe0d065a460c50515f2be/68747470733a2f2f63646e6a732e636c6f7564666c6172652e636f6d2f616a61782f6c6962732f6f637469636f6e732f382e352e302f7376672f617263686976652e737667) **Archived Repository**
 This code is no longer maintained. Feel free to fork it, but use it at your own risks.  Marmelab Microrest
==================

[](#marmelab-microrest)

Microrest is a Silex provider to setting up a REST API on top of a relational database, based on a YAML (RAML) configuration file.

Check out the [launch post](http://marmelab.com/blog/2015/01/05/introducing-microrest-raml-api-in-silex.html).

What is RAML ?
--------------

[](#what-is-raml-)

[RESTful API Modeling Language (RAML)](http://raml.org/) is a simple and succinct way of describing practically-RESTful APIs. It encourages reuse, enables discovery and pattern-sharing, and aims for merit-based emergence of best practices.

You can easily set up a RAML file from [API Designer](http://api-portal.anypoint.mulesoft.com/raml/api-designer).

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

[](#installation)

To install microrest.php library, run the command below and you will get the latest version:

```
composer require marmelab/microrest "~1.0@dev"
```

Enable `ServiceController`, `Doctrine` and `Microrest` service providers in your application:

```
$app->register(new Silex\Provider\ServiceControllerServiceProvider());
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
    'db.options' => array(
        'driver'   => 'pdo_sqlite',
        'path'     => __DIR__.'/app.db',
    ),
));
$app->register(new Marmelab\Microrest\MicrorestServiceProvider(), array(
    'microrest.config_file' => __DIR__ . '/api.raml',
));
```

You need to give the path to the `RAML` file describing your API. You can find an example into the `tests/fixtures` directory.

Then, browse your new API REST on the url defined in the `baseUrl` configuration of your `RAML` api file.

Tests
-----

[](#tests)

Run the tests suite with the following commands:

```
make install
make test
```

Demo
----

[](#demo)

You can find a complete demo application in `examples/ng-admin`. You just need 2 commands to install and run it:

```
make install-demo
make run-demo
```

Play with the Silex demo API at the url: `http://localhost:8888/api`

Explore the API using [ng-admin](https://github.com/marmelab/ng-admin) backend administration at the url: `http://localhost:8888/admin`

License
-------

[](#license)

microrest.php is licensed under the [MIT License](LICENSE), courtesy of [marmelab](http://marmelab.com).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b91061371e663f2d19dd82a934169a6b9087642627bad3d6e959db816c6182cb?d=identicon)[jeromemacias](/maintainers/jeromemacias)

---

Top Contributors

[![jeromemacias](https://avatars.githubusercontent.com/u/582446?v=4)](https://github.com/jeromemacias "jeromemacias (30 commits)")[![alexisjanvier](https://avatars.githubusercontent.com/u/547706?v=4)](https://github.com/alexisjanvier "alexisjanvier (6 commits)")[![fzaninotto](https://avatars.githubusercontent.com/u/99944?v=4)](https://github.com/fzaninotto "fzaninotto (4 commits)")[![brikou](https://avatars.githubusercontent.com/u/383212?v=4)](https://github.com/brikou "brikou (2 commits)")[![mhor](https://avatars.githubusercontent.com/u/4103719?v=4)](https://github.com/mhor "mhor (1 commits)")

### Embed Badge

![Health badge](/badges/marmelab-microrest/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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