mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #8656 from kenjis/add-comments-to-PDO_PGSQL-DSN
docs: add commnets on Postgre::convertDSN()
This commit is contained in:
commit
87652c92c8
@ -65,6 +65,9 @@ class Connection extends BaseConnection
|
||||
}
|
||||
|
||||
// Convert DSN string
|
||||
// @TODO This format is for PDO_PGSQL.
|
||||
// https://www.php.net/manual/en/ref.pdo-pgsql.connection.php
|
||||
// Should deprecate?
|
||||
if (mb_strpos($this->DSN, 'pgsql:') === 0) {
|
||||
$this->convertDSN();
|
||||
}
|
||||
|
@ -198,6 +198,9 @@ final class ConfigTest extends CIUnitTestCase
|
||||
*/
|
||||
public function testConvertDSN(string $input, string $expected): void
|
||||
{
|
||||
// @TODO This format is for PDO_PGSQL.
|
||||
// https://www.php.net/manual/en/ref.pdo-pgsql.connection.php
|
||||
// Should deprecate?
|
||||
$this->dsnGroupPostgreNative['DSN'] = $input;
|
||||
$conn = Config::connect($this->dsnGroupPostgreNative, false);
|
||||
$this->assertInstanceOf(BaseConnection::class, $conn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user