Yii DataBase PostgreSQL Extension

dev-main 2022-02-10 19:06 UTC

This package is auto-updated.

Last update: 2022-06-10 19:46:51 UTC


68747470733a2f2f796969736f66742e6769746875622e696f2f646f63732f696d616765732f7969695f6c6f676f2e737667 68747470733a2f2f7777772e706f737467726573716c2e6f72672f6d656469612f696d672f61626f75742f70726573732f656c657068616e742e706e67

Yii DataBase PostgreSQL Extension

This package provides PostgreSQL extension for Yii DataBase library. It is used in Yii Framework but is supposed to be usable separately.

Latest Stable Version Total Downloads Scrutinizer Code Quality Code Coverage

Support version

PHP Pgsql Version CI-Actions
7.4 - 8.0 9.0 - 13.0 Build status Mutation testing badge static analysis type-coverage


The package could be installed via composer:

composer require yiisoft/db-pgsql


Using yiisoft/composer-config-plugin automatically get the settings of Yiisoft\Cache\CacheInterface::class, LoggerInterface::class, and Profiler::class.


use Yiisoft\Db\Connection\ConnectionInterface;
use Yiisoft\Db\Pgsql\Connection as PgsqlConnection;

return [
    ConnectionInterface::class => [
        'class' => PgsqlConnection::class,
        '__construct()' => [
            'dsn' => $params['yiisoft/db-pgsql']['dsn']
        'setUsername()' => [$params['yiisoft/db-pgsql']['username']],
        'setPassword()' => [$params['yiisoft/db-pgsql']['password']],


use Yiisoft\Db\Connection\Dsn;

return [
    'yiisoft/db-pgsql' => [
        'dsn' => (new Dsn('pgsql', '', 'yiitest', '5432'))->asString(),
        'username' => 'root',
        'password' => 'root',

Unit testing

The package is tested with PHPUnit. To run tests:


Mutation testing

The package tests are checked with Infection mutation framework. To run it:


Static analysis

The code is statically analyzed with Psalm. To run static analysis:


Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack


The Yii DataBase PostgreSQL Extension is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.