PHPackages                             maximgubar/platformsh-symfonyflex-bridge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. maximgubar/platformsh-symfonyflex-bridge

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

maximgubar/platformsh-symfonyflex-bridge
========================================

Bridge library for running Symfony Flex on Platform.sh

4.0.0(5y ago)15.5k[1 PRs](https://github.com/maximgubar/symfonyflex-bridge/pulls)MITPHPPHP ^7.2 || ^8.0

Since Jan 25Pushed 5y agoCompare

[ Source](https://github.com/maximgubar/symfonyflex-bridge)[ Packagist](https://packagist.org/packages/maximgubar/platformsh-symfonyflex-bridge)[ RSS](/packages/maximgubar-platformsh-symfonyflex-bridge/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (2)Versions (17)Used By (0)

Symfony Flex bridge for Platform.sh
===================================

[](#symfony-flex-bridge-for-platformsh)

[![CircleCI Status](https://camo.githubusercontent.com/adad72a7e8bdf231698e7ab2713bde718419339bd3d65b2ea039ada521700bda/68747470733a2f2f636972636c6563692e636f6d2f67682f706c6174666f726d73682f73796d666f6e79666c65782d6272696467652e7376673f7374796c653d736869656c6426636972636c652d746f6b656e3d3a636972636c652d746f6b656e)](https://circleci.com/gh/platformsh/symfonyflex-bridge)

This simple bridge library connects a Symfony Flex-based application to [Platform.sh](https://platform.sh/). In the typical case it should be completely fire-and-forget.

Symfony Flex expects all configuration to come in through environment variables with specific names in a specific format. Platform.sh provides configuration information as environment variables in a different specific format. This library handles mapping the Platform.sh variables to the format Symfony Flex expects for common values.

Usage
-----

[](#usage)

Simply require this package using Composer. When Composer's autoload is included this library will be activated and the environment variables set. As long as that happens before Symfony bootstraps its configuration (which it almost certainly will) everything should work fine with no further user-interaction necessary.

```
composer require platformsh/symfonyflex-bridge

```

Mappings performed
------------------

[](#mappings-performed)

- If a Platform.sh relationship named `database` is defined, it will be taken as an SQL database and mapped to the `DATABASE_URL` environment variable for Symfony Flex. (Note: Due to a bug in Doctrine, the code currently assumes MariaDB 10.2 as the service version. If that Doctrine bug is ever resolved this hard-coding can be removed.)
- If a Platform.sh relationship named `mongodatabase` is defined, it will be taken as a Doctrine ODM database and mapped to the appropriate environment variables. Note that you may still need to reference those environment variables in your configuration if they are not defined by default. See the [DoctrineMongoDBBundle](https://symfony.com/doc/master/bundles/DoctrineMongoDBBundle/index.html) documentation for more details.
- The Symfony Flex `APP_SECRET` is set based on the `PLATFORM_PROJECT_ENTROPY` variable, which is provided for exactly this purpose.
- The `MAILER_URL` variable is set based on the `PLATFORM_SMTP_HOST` variable. That will be used by SwiftMailer if it is installed. If not installed this value will be safely ignored.
- If no `APP_ENV` value is set, it will default to `prod`.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 82% 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 ~95 days

Recently: every ~172 days

Total

14

Last Release

1841d ago

Major Versions

1.5.0 → 2.0.02019-03-22

2.4.0 → 3.0.02021-04-29

3.0.0 → 4.0.02021-06-14

PHP version history (3 changes)1.4.0PHP ^7.1

3.0.0PHP &gt;=7.2

4.0.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/35364f9bf8e8af76953238d28f15a7d4d027746288de830e1fa5db551cdeedd6?d=identicon)[maximgubar](/maintainers/maximgubar)

---

Top Contributors

[![Crell](https://avatars.githubusercontent.com/u/254863?v=4)](https://github.com/Crell "Crell (50 commits)")[![tristanbes](https://avatars.githubusercontent.com/u/346010?v=4)](https://github.com/tristanbes "tristanbes (3 commits)")[![maximgubar](https://avatars.githubusercontent.com/u/2241775?v=4)](https://github.com/maximgubar "maximgubar (2 commits)")[![chadwcarlson](https://avatars.githubusercontent.com/u/5473659?v=4)](https://github.com/chadwcarlson "chadwcarlson (2 commits)")[![damz](https://avatars.githubusercontent.com/u/110678?v=4)](https://github.com/damz "damz (1 commits)")[![Plopix](https://avatars.githubusercontent.com/u/313532?v=4)](https://github.com/Plopix "Plopix (1 commits)")[![ralt](https://avatars.githubusercontent.com/u/1016379?v=4)](https://github.com/ralt "ralt (1 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maximgubar-platformsh-symfonyflex-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/maximgubar-platformsh-symfonyflex-bridge/health.svg)](https://phpackages.com/packages/maximgubar-platformsh-symfonyflex-bridge)
```

PHPackages © 2026

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