PHPackages                             symlex/rest-api - 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. symlex/rest-api

ActiveProject[API Development](/categories/api)

symlex/rest-api
===============

Example REST API application based on Symlex Core

v1.0.3(7y ago)12621[2 PRs](https://github.com/symlex/rest-api/pulls)MITHTMLPHP &gt;=7.1

Since Jan 4Pushed 3y agoCompare

[ Source](https://github.com/symlex/rest-api)[ Packagist](https://packagist.org/packages/symlex/rest-api)[ Docs](https://github.com/symlex/rest-api/)[ RSS](/packages/symlex-rest-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Example REST API based on [Symlex Core](https://github.com/symlex/symlex-core)
==============================================================================

[](#example-rest-api-based-on-symlex-core)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![Documentation](https://camo.githubusercontent.com/84e7e669c9ae017b0fad97fbe04fe187e788bc569eabc772c41e9a2ec33e2708/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f73796d6c65782d646f63732f62616467652f3f76657273696f6e3d6c6174657374267374796c653d666c6174)](https://docs.symlex.org/en/latest/)[![Community Chat](https://camo.githubusercontent.com/bf8ea831b14602e140cc1b36ea5c1979dc72055a61475a804d68ca875bdaa52d/68747470733a2f2f6261646765732e6769747465722e696d2f73796d6c65782f636f6d6d756e6974792e706e67)](https://gitter.im/symlex/community)

Before you start, make sure you have PHP 7.2+, [Composer](https://getcomposer.org/) and [Docker](https://www.docker.com/) installed on your system ([howto](https://docs.symlex.org/en/latest/osx/) for Mac OS X). Instead of using Docker, you can set up your own runtime environment based on the existing [Dockerfiles](https://github.com/symlex/rest-api/tree/master/app/docker). We recommend using [Nginx](https://www.nginx.com/) with [PHP-FPM](http://php.net/manual/en/install.fpm.php)and URL [rewrite rules](https://github.com/symlex/symlex/blob/master/app/docker/nginx/site.conf) similar to Symfony.

Our [main repository](https://github.com/symlex/symlex) shows how to use Symlex with RoadRunner for additional performance.

**Step 1:** Run `composer` to create a new project:

```
composer create-project symlex/rest-api myapp

```

Composer will ask for config values to generate `app/config/parameters.yml` for you.

Make sure `storage/cache` is writable so that cache files can be created by the app.

**Step 2:** Start nginx and PHP using `docker-compose`:

```
cd myapp
docker-compose up

```

*Note: This docker-compose configuration is for testing and development purposes only. You might need to tweak it if you run Docker with a different user for security reasons. On OS X, the current release of Docker is [really slow](https://twitter.com/lastzero/status/829191426391027712)in executing PHP from the host's file system.*

**Step 3:** Open  in a browser ([source](src/Controller/ExampleController.php)).

To open a terminal, run `docker-compose exec php sh`.

YAML files located in `app/config` configure the app based on parameters and services. The main config file is `app/config/rest.yml`.

If you add `localhost-debug` to your `/etc/hosts` and access the site with that, it will load in debug mode (you'll see a stack trace and other debug information on the error pages).

Our complete framework documentation can be found on [docs.symlex.org](https://docs.symlex.org/en/latest/).

About
-----

[](#about)

Symlex is maintained by [Michael Mayer](https://blog.liquidbytes.net/about/) and aims to simplify agile Web development by providing a working system that promotes best practices by example. Michael released his [first PHP framework](http://freshmeat.sourceforge.net/projects/awf) in 2001 and has worked with various major framework vendors in the past. Building this would not have been possible without a lot of prior work by other developers. Thank you to those and everyone who contributed!

> Choice is the enemy of productivity. Put another way, if your solution does everything, and has no opinions about anything, then it solves nothing. ― *Asim Aslam*

Feel free to send an e-mail to  if you have any questions, need [commercial support](https://blog.liquidbytes.net/contact/) or just want to say hello. We welcome contributions of any kind. If you have a bug or an idea, read our [guide](https://docs.symlex.org/en/latest/contribute/) before opening an issue.

Donations
---------

[](#donations)

Symlex is a non-profit project run entirely by volunteers. You're most welcome to support us via [GitHub Sponsors](https://github.com/sponsors/lastzero), especially if you need help with using our software. They will match every donation in the first year.

Please leave a star if you like this project, it provides additional motivation to keep going. Thank you very much! &lt;3

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~1 days

Total

4

Last Release

2687d ago

### Community

Maintainers

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

---

Top Contributors

[![lastzero](https://avatars.githubusercontent.com/u/301686?v=4)](https://github.com/lastzero "lastzero (21 commits)")

---

Tags

example-projectphprestrest-apisymfonysymfony-application

### Embed Badge

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

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)

PHPackages © 2026

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