PHPackages                             dorpmaster/dbal-amphp-postgres - 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. [Database &amp; ORM](/categories/database)
4. /
5. dorpmaster/dbal-amphp-postgres

ActiveLibrary[Database &amp; ORM](/categories/database)

dorpmaster/dbal-amphp-postgres
==============================

PostgreSQL-only Doctrine DBAL driver backed by an AMPHP transport.

1.2.0(1mo ago)01MITPHPPHP ^8.5

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/Dorpmaster/dbal-amphp-postgres)[ Packagist](https://packagist.org/packages/dorpmaster/dbal-amphp-postgres)[ Docs](https://github.com/dorpmaster/dbal-amphp-postgres)[ RSS](/packages/dorpmaster-dbal-amphp-postgres/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (11)Versions (5)Used By (0)

dorpmaster/dbal-amphp-postgres
==============================

[](#dorpmasterdbal-amphp-postgres)

PostgreSQL-only Doctrine DBAL driver backed by an AMPHP transport.

The library keeps the Doctrine DBAL and Doctrine ORM programming model synchronous while moving database I/O to a fiber-compatible `amphp/postgres` transport. It targets applications that want PostgreSQL-specific behavior, Doctrine integration, and predictable transaction ownership without introducing an async-native ORM.

Key features
------------

[](#key-features)

- PostgreSQL-only driver with a real `amphp/postgres` transport
- supported transport fixed to `ext-pgsql`
- fiber-compatible I/O behind the standard Doctrine DBAL API
- Doctrine ORM baseline support, including `EntityManager`, `UnitOfWork`, DQL, QueryBuilder, and validated lazy-loading scenarios
- Doctrine Migrations-compatible PostgreSQL metadata introspection, including duplicate-column-alias handling
- transaction pinning on one physical PostgreSQL connection
- strict parameter conversion with DBAL-compatible safe scalar string support for `INTEGER` and `BOOLEAN`
- explicit close and cleanup semantics for long-running processes
- lightweight optional observability hooks

Quick start
-----------

[](#quick-start)

Install the package with Composer:

```
composer config allow-plugins.cweagans/composer-patches true
composer require dorpmaster/dbal-amphp-postgres
```

The package declares a Composer Patches dependency patch for `amphp/postgres`. Composer plugins must stay enabled during install and update, otherwise the compatibility patch is not applied.

Supported transport: `ext-pgsql`.

The package intentionally does not support `ext-pq` / `pecl-pq`. The driver forces the `ext-pgsql` connector even if `pq` is installed in the PHP runtime.

Configure Doctrine DBAL with the custom driver and wrapper:

```
