Skip to content

Commit 28df694

Browse files
authored
Merge pull request #5 from tyrsson:rename-package
Renames package to php-db/pgsql
2 parents 7b191b9 + 50f8726 commit 28df694

File tree

6 files changed

+42
-44
lines changed

6 files changed

+42
-44
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "php-db/phpdb-adapter-pgsql",
2+
"name": "php-db/phpdb-pgsql",
33
"description": "PostgreSQL support for php-db",
44
"license": "BSD-3-Clause",
55
"keywords": [
@@ -9,9 +9,9 @@
99
],
1010
"homepage": "https://php-db.dev",
1111
"support": {
12-
"issues": "https://github.com/php-db/phpdb-adapter-pgsql/issues",
13-
"source": "https://github.com/php-db/phpdb-adapter-pgsql",
14-
"forum": "https://github.com/php-db/phpdb-adapter-pgsql/discussions"
12+
"issues": "https://github.com/php-db/phpdb-pgsql/issues",
13+
"source": "https://github.com/php-db/phpdb-pgsql",
14+
"forum": "https://github.com/php-db/phpdb-pgsql/discussions"
1515
},
1616
"minimum-stability": "dev",
1717
"prefer-stable": true,

composer.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ConfigProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace PhpDb\Adapter\Pgsql;
66

7-
use PhpDb\Adapter\Adapter;
87
use PhpDb\Adapter\AdapterInterface;
98
use PhpDb\Adapter\Driver\ConnectionInterface;
109
use PhpDb\Adapter\Driver\DriverInterface;
@@ -25,7 +24,7 @@
2524
public function __invoke(): array
2625
{
2726
return [
28-
'dependencies' => $this->getDependencies(),
27+
'dependencies' => $this->getDependencies(),
2928
//AdapterInterface::class => $this->getConfig(),
3029
];
3130
}

src/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public function execute($sql): ResultInterface
262262
* {@inheritDoc}
263263
*/
264264
#[Override]
265-
public function getLastGeneratedValue($name = null): bool|int|string|null
265+
public function getLastGeneratedValue(?string $name = null): string|int|false|null
266266
{
267267
if ($name === null) {
268268
return null;

src/Pdo/Connection.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ public function connect(): ConnectionInterface&PdoConnectionInterface
5757
$options = [];
5858
foreach ($this->connectionParameters as $key => $value) {
5959
$result = match (strtolower($key)) {
60-
'dsn' => $dsn = (string) $value,
61-
'user', 'username' => $username = (string) $value,
62-
'password', 'pass' => $password = (string) $value,
63-
'host', 'hostname' => $hostname = (string) $value,
64-
'port' => $port = (int) $value,
65-
'dbname', 'database' => $database = (string) $value,
66-
'unix_socket' => $unixSocket = (string) $value,
60+
'dsn' => $dsn = (string) $value,
61+
'user', 'username' => $username = (string) $value,
62+
'password', 'passwd', 'pw' => $password = (string) $value,
63+
'host', 'hostname' => $hostname = (string) $value,
64+
'port' => $port = (int) $value,
65+
'dbname', 'database', 'db', 'schema' => $database = (string) $value,
66+
'unix_socket' => $unixSocket = (string) $value,
6767
// todo: should we suppport sslmode for pdo pgsql?
6868
'driver_options' => (function (&$options, $value): void {
6969
$value = (array) $value;

test/unit/Adapter/ConfigProviderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
namespace PhpDbTest\Pgsql;
66

7-
use Laminas\ServiceManager\Factory\InvokableFactory;
87
use PhpDb\Adapter\Driver\ConnectionInterface;
98
use PhpDb\Adapter\Driver\DriverInterface;
9+
use PhpDb\Adapter\Driver\Pdo\Statement as PdoStatement;
1010
use PhpDb\Adapter\Driver\PdoConnectionInterface;
1111
use PhpDb\Adapter\Driver\PdoDriverInterface;
12-
use PhpDb\Adapter\Driver\Pdo\Statement as PdoStatement;
1312
use PhpDb\Adapter\Pgsql;
1413
use PhpDb\Adapter\Pgsql\Pdo\Connection as PdoConnection;
1514
use PhpDb\Adapter\Pgsql\Pdo\Driver as PdoDriver;

0 commit comments

Comments
 (0)