PHPackages                             zfr/zfr-rest - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. zfr/zfr-rest

ActiveLibrary[HTTP &amp; Networking](/categories/http)

zfr/zfr-rest
============

Zend Framework 2 REST Module.

v0.5.0(10y ago)8120.6k↓100%31[18 issues](https://github.com/zf-fr/zfr-rest/issues)MITPHPPHP &gt;=5.5

Since Aug 5Pushed 9y ago18 watchersCompare

[ Source](https://github.com/zf-fr/zfr-rest)[ Packagist](https://packagist.org/packages/zfr/zfr-rest)[ Docs](https://github.com/zf-fr/zfr-rest)[ RSS](/packages/zfr-zfr-rest/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (20)Used By (0)

ZfrRest
=======

[](#zfrrest)

[![Build Status](https://camo.githubusercontent.com/a2b7ca145a31433eb1a7ad320e327a65ca05f7cb1f8b6e229747743a7a278a04/68747470733a2f2f7472617669732d63692e6f72672f7a662d66722f7a66722d726573742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/zf-fr/zfr-rest)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/5eae3d49209d2b4ad378ff92fb6f8f99090f4afb4f9cb859ea489e680ed832e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7a662d66722f7a66722d726573742f6261646765732f7175616c6974792d73636f72652e706e673f733d37386564343038633932376530316362323761623766336363303433343961373730313332353530)](https://scrutinizer-ci.com/g/zf-fr/zfr-rest/)[![Latest Stable Version](https://camo.githubusercontent.com/0d7bc45345d0469d0a4de2c2d635ba75997bb6ffbedb8fafed5e565fa2ffb985/68747470733a2f2f706f7365722e707567782e6f72672f7a66722f7a66722d726573742f762f737461626c652e706e67)](https://packagist.org/packages/zfr/zfr-rest)[![Total Downloads](https://camo.githubusercontent.com/8dd04180a1310b594a682b44fb192e232755a95fa9c4418ca7ecbc6a2b27f37e/68747470733a2f2f706f7365722e707567782e6f72672f7a66722f7a66722d726573742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/zfr/zfr-rest)[![Dependency Status](https://camo.githubusercontent.com/9b8b88aa82c3ecfcebcd4fdb1ef1849ff03670be950d73bb4ba520b117931fd0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7061636b6167652f7068702d2d7a66722d2d7a66722d726573742f62616467652e706e67)](https://www.versioneye.com/package/php--zfr--zfr-rest)

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

[](#installation)

Install the module by typing (or add it to your `composer.json` file):

`php composer.phar require zfr/zfr-rest:0.5.*`

Then, add the keys "ZfrRest" to your modules list in `application.config.php` file, and copy-paste the file `zfr_rest.global.php.dist` into your `autoload` folder (don't forget to remove the .dist extension at the end!).

ZfrRest 0.4+ vs ZfrRest 0.3
---------------------------

[](#zfrrest-04-vs-zfrrest-03)

Starting from version 0.4, ZfrRest has been completely rewritten from scratch. Previously, ZfrRest used to do a lot of things automatically for you, from rendering, to automatic routing and creation of routes. While it was nice for very simple use cases, it was actually very hard to extend, introduced a lot of performance problems and was quite unflexible.

Now, ZfrRest is more a "small REST utility". It provides a simple way to handle HTTP exceptions, a lightweight controller that can both handle action and HTTP verbs, and a view layer adapted for resource rendering (that can optionally use versioning to render a resource differently based on the version). You can consider ZfrRest as a module that you can use if you want to create a REST API, instead of a full-blown module like Apigility or previous ZfrRest versions.

Additionally, dependency to Doctrine has been completely removed and can be used by anyone.

ZfrRest vs Apigility
--------------------

[](#zfrrest-vs-apigility)

[Apigility](http://www.apigility.org) is a Zend Framework 2 API builder that also aims to simplify the creation of REST APIs.

Starting from ZfrRest 0.4+, there is actually nothing in common between those two libraries. Apigility is a full-blown module that does a lot of things, from headers negotiation, automatic rendering, link generation, a code-generator... On the other hand, ZfrRest is the bare metal, and leave most of the responsibility and power to you.

Documentation
-------------

[](#documentation)

The official documentation is available in the [/docs](/docs) folder.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.6% 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 ~52 days

Recently: every ~99 days

Total

19

Last Release

3711d ago

PHP version history (3 changes)v0.0.1PHP &gt;=5.3.3

v0.1.0PHP &gt;=5.4

v0.4.0PHP &gt;=5.5

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/9e3c74232d02a5fedbcef4650bac1d1103be292d4a013f6f9e692befcc9bb7ca?d=identicon)[bakura10](/maintainers/bakura10)

---

Top Contributors

[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (510 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (52 commits)")[![Orkin](https://avatars.githubusercontent.com/u/1061903?v=4)](https://github.com/Orkin "Orkin (9 commits)")[![jmleroux](https://avatars.githubusercontent.com/u/1516770?v=4)](https://github.com/jmleroux "jmleroux (9 commits)")[![awartoft](https://avatars.githubusercontent.com/u/1127626?v=4)](https://github.com/awartoft "awartoft (4 commits)")[![lku](https://avatars.githubusercontent.com/u/702420?v=4)](https://github.com/lku "lku (3 commits)")[![Thinkscape](https://avatars.githubusercontent.com/u/270528?v=4)](https://github.com/Thinkscape "Thinkscape (3 commits)")[![zluiten](https://avatars.githubusercontent.com/u/1336070?v=4)](https://github.com/zluiten "zluiten (1 commits)")[![danizord](https://avatars.githubusercontent.com/u/1850941?v=4)](https://github.com/danizord "danizord (1 commits)")[![gabrielsch](https://avatars.githubusercontent.com/u/1733354?v=4)](https://github.com/gabrielsch "gabrielsch (1 commits)")[![mesaugat](https://avatars.githubusercontent.com/u/4240991?v=4)](https://github.com/mesaugat "mesaugat (1 commits)")[![ojhaujjwal](https://avatars.githubusercontent.com/u/4995501?v=4)](https://github.com/ojhaujjwal "ojhaujjwal (1 commits)")[![sasezaki](https://avatars.githubusercontent.com/u/42755?v=4)](https://github.com/sasezaki "sasezaki (1 commits)")

---

Tags

apirestzf2restfulZend Framework

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/zfr-zfr-rest/health.svg)

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

###  Alternatives

[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M266](/packages/nategood-httpful)[zfr/zfr-cors

Zend Framework module that let you deal with CORS requests

611.2M3](/packages/zfr-zfr-cors)[tbbc/rest-util-bundle

Bundle for integrating tbbc/rest-util lib in a Symfony application.

30205.4k1](/packages/tbbc-rest-util-bundle)

PHPackages © 2026

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