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.
Support version
| PHP | Pgsql Version | CI-Actions |
|---|---|---|
| 7.4 - 8.0 | 9.0 - 13.0 |
Installation
The package could be installed via composer:
composer require yiisoft/db-pgsqlConfiguration
Using yiisoft/composer-config-plugin automatically get the settings of Yiisoft\Cache\CacheInterface::class, LoggerInterface::class, and Profiler::class.
Di-Container:
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']],
]
];Params.php
use Yiisoft\Db\Connection\Dsn;
return [
'yiisoft/db-pgsql' => [
'dsn' => (new Dsn('pgsql', '127.0.0.1', 'yiitest', '5432'))->asString(),
'username' => 'root',
'password' => 'root',
]
];Unit testing
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunitMutation testing
The package tests are checked with Infection mutation framework. To run it:
./vendor/bin/infectionStatic analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalmSupport the project
Follow updates
License
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.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


