PHPackages                             shorock/flex-doctrine-pg - 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. shorock/flex-doctrine-pg

ActiveLibrary

shorock/flex-doctrine-pg
========================

Open minded PostGres connection driver for Doctrine DBAL

0.1.2(9y ago)014MITPHP

Since Jan 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/shorock/flex-doctrine-pg)[ Packagist](https://packagist.org/packages/shorock/flex-doctrine-pg)[ RSS](/packages/shorock-flex-doctrine-pg/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

A little Doctrine DBAL driver for PostgreSQL connections. Basically, we've taken to using certain options in the libpq library that Doctrine's built in DSN constructor is opinionated about. Notably, *sslcert* or *service*, whereby we can use a different SSL certificate for *cert* authentication to Postgres. (BTW - if you just have one cert/key per user, they can just use the canon name of `~/.postgresql/server.crt`, `server.key`, &amp; `root.crt` and you don't need this module.

If you've never used ['service', it's a lovely way to go](https://www.postgresql.org/docs/9.6/static/libpq-pgservice.html). You can also do your command line connection with `$ psql service=mydb` if you set that up.

Now, if you're using Doctrine more directly, the fact that it can't handle some of these advanced configuration options isn't such a problem. Write your options into `new PDO(...)` and pass it to Doctrine. Not so easy if you're wanting to use something higher level (Symfony, etc).

I'm pulling from the driverOptions array for bare Doctrine DBAL because I didn't want to add more options to the Symfony Doctrine bundle's top-level configuration schema.

Example (Symfony - config.yml)
------------------------------

[](#example-symfony---configyml)

```
doctrine:
    dbal:
      driver_class: Shorock\Doctrine\FlexPDOPgSql\Driver
      user: shorock
      options:
        service: libdb
	# or
	# dsn: "pgsql:dbname=libdb.you.edu sslcert=/etc/pki/alternate.crt sslkey=/etc/pki/alternate.key"

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity53

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3394d ago

### Community

---

Top Contributors

[![shorock](https://avatars.githubusercontent.com/u/9286584?v=4)](https://github.com/shorock "shorock (7 commits)")

### Embed Badge

![Health badge](/badges/shorock-flex-doctrine-pg/health.svg)

```
[![Health](https://phpackages.com/badges/shorock-flex-doctrine-pg/health.svg)](https://phpackages.com/packages/shorock-flex-doctrine-pg)
```

PHPackages © 2026

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