The base package for graviton

Installs: 7 960

Dependents: 1

Suggesters: 0

Security: 0

Stars: 12

Watchers: 17

Forks: 8

Open Issues: 5


v5.5.3 2021-07-29 08:33 UTC

This package is auto-updated.

Last update: 2021-09-23 09:43:46 UTC


CI Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

Graviton is a Symfony and Doctrine Mongo ODM based REST server generation toolkit. So it stores all data in MongoDB.

You can define your REST service in an simple JSON format, run the generator - and voilà - your REST API is ready to go.

Let's say you define this file:

  "id": "Example",
  "service": {
    "readOnly": false,
    "routerBase": "/example/endpoint/"
  "target": {
    "fields": [
        "name": "id",
        "type": "string"
        "name": "data",
        "type": "string"

Then you run the generator

php bin/console graviton:generate:dynamicbundles

And once running, you will have a full RESTful endpoint at /example/endpoint, supporting GET, POST, PUT, DELETE and PATCH as well as a valid generated JSON schema endpoint, pagination headers (Link as github does it) and much more.

The generated code are static PHP files and configuration for the Serializer and Symfony and is regarded as disposable. You can always regenerate it - don't touch the generated code.

The application is highly optimized for runtime performance, particurarly in the context of PHP-FPM with activated opcache.

It boasts many additional features (such as special validators and many flags and configurations) which are currently mostly undocumented as this project was not built for public usage in mind. But if there is interest and support from outside users, we welcome questions and contributions.


composer install




php bin/console


There are some general docs on interacting with the codebase as a whole.

Some even broader scoped docs in a seperate repo.

The bundle readme files which show how to interact with the various subsystems.

And not to forget, the all important CHANGELOG.