PHPackages                             dunglas/api-platform-heroku - 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. dunglas/api-platform-heroku

ActiveLibrary[API Development](/categories/api)

dunglas/api-platform-heroku
===========================

Helpers to use API Platform and Symfony applications on Heroku.

63.9k1[9 issues](https://github.com/dunglas/api-platform-heroku/issues)PHP

Since Jul 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/dunglas/api-platform-heroku)[ Packagist](https://packagist.org/packages/dunglas/api-platform-heroku)[ RSS](/packages/dunglas-api-platform-heroku/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

API Platform and Symfony helpers to deploy on Heroku
====================================================

[](#api-platform-and-symfony-helpers-to-deploy-on-heroku)

This library eases the deployment of [API Platform](http://api-platform.com) and [Symfony](http://symfony.com)applications on the [Heroku](http://heroku.com) platform.

[![Build Status](https://camo.githubusercontent.com/cfbff62aa6b53e138ff1398ac60b823c35c9b3fec9fd4eecd000d2f86f4c83a9/68747470733a2f2f7472617669732d63692e6f72672f64756e676c61732f6170692d706c6174666f726d2d6865726f6b752e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dunglas/api-platform-heroku)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5c5c6f5856e6810f1fdfefa06160f52a94bde87b4e934e3b0bafe40ca06ec575/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64756e676c61732f6170692d706c6174666f726d2d6865726f6b752f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dunglas/api-platform-heroku/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/1c643448763a387ccc19516005cbc1217495bcbce2ead175c6997d176066953b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39663463386332322d396266382d343436372d616232622d3264306337333231303832372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/9f4c8c22-9bf8-4467-ab2b-2d0c73210827)[![Dependency Status](https://camo.githubusercontent.com/f02d095cdde68206f60de6f867479885f85aeb9c38c836c1400209defc06ef03/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535393830396161363136363334303032323030303031332f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/559809aa6166340022000013)

Install
-------

[](#install)

Use [Composer](http://getcomposer.org) to install the library in your project:

`composer require dunglas/api-platform-heroku`

Database helper
---------------

[](#database-helper)

The library provides a Composer script to create Symfony parameters for the Doctrine bundle by parsing the `DATABASE_URL`environment variable populated by the Heroku Postgres addon.

To use it, start by adding the script to your `composer.json` file:

```
// ...
    "scripts": {
        "pre-install-cmd": [
          "Dunglas\\Heroku\\Database::createParameters"
        ],
        // ...
    }
```

Thanks to the ability of the Symfony Dependency Injection Component to read parameters from special environment variables, the parameters are automatically populated.

Change the content of the `app/config/services.yml` like the following to use them:

```
doctrine:
    dbal:
        driver:   "pdo_pgsql"
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
```

In your local development environment, don't forget to set the `SYMFONY__DATABASE_URL` environment variable. A typical value for that variable is `postgres://user:pass@server:5432/dbname.

A convenient way to manage environment variable is the [PHP dotenv](https://github.com/vlucas/phpdotenv) library.

Credits
-------

[](#credits)

This library is part of the [API Platform](http://api-platform.com) project. Created by [Kévin Dunglas](dunglas@gmail.com).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57224?v=4)[Kévin Dunglas](/maintainers/dunglas)[@dunglas](https://github.com/dunglas)

---

Top Contributors

[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (2 commits)")

### Embed Badge

![Health badge](/badges/dunglas-api-platform-heroku/health.svg)

```
[![Health](https://phpackages.com/badges/dunglas-api-platform-heroku/health.svg)](https://phpackages.com/packages/dunglas-api-platform-heroku)
```

###  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)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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