From 50f8726129c6be1c913ed59949444eacd35c3425 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Sat, 24 Jan 2026 01:53:15 -0600 Subject: [PATCH] Renames package to php-db/pgsql Bumps deps Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- composer.json | 8 ++-- composer.lock | 56 ++++++++++++------------ src/ConfigProvider.php | 3 +- src/Connection.php | 2 +- src/Pdo/Connection.php | 14 +++--- test/unit/Adapter/ConfigProviderTest.php | 3 +- 6 files changed, 42 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index 488552d..bcfaaa0 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "php-db/phpdb-adapter-pgsql", + "name": "php-db/phpdb-pgsql", "description": "PostgreSQL support for php-db", "license": "BSD-3-Clause", "keywords": [ @@ -9,9 +9,9 @@ ], "homepage": "https://php-db.dev", "support": { - "issues": "https://github.com/php-db/phpdb-adapter-pgsql/issues", - "source": "https://github.com/php-db/phpdb-adapter-pgsql", - "forum": "https://github.com/php-db/phpdb-adapter-pgsql/discussions" + "issues": "https://github.com/php-db/phpdb-pgsql/issues", + "source": "https://github.com/php-db/phpdb-pgsql", + "forum": "https://github.com/php-db/phpdb-pgsql/discussions" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/composer.lock b/composer.lock index 2a27a6a..75af20f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ef5a9885c442601a7cc739a431edf525", + "content-hash": "d393ac325bfe62307968139b2b0fc5f7", "packages": [ { "name": "brick/varexporter", @@ -263,12 +263,12 @@ "source": { "type": "git", "url": "https://github.com/php-db/phpdb.git", - "reference": "abf7549cfeaa8d62977313a13dd57435737e1a9b" + "reference": "dc60adb7994334d3a37a9c2da588052d1f83bd8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-db/phpdb/zipball/abf7549cfeaa8d62977313a13dd57435737e1a9b", - "reference": "abf7549cfeaa8d62977313a13dd57435737e1a9b", + "url": "https://api.github.com/repos/php-db/phpdb/zipball/dc60adb7994334d3a37a9c2da588052d1f83bd8a", + "reference": "dc60adb7994334d3a37a9c2da588052d1f83bd8a", "shasum": "" }, "require": { @@ -324,7 +324,7 @@ "issues": "https://github.com/php-db/phpdb/issues", "source": "https://github.com/php-db/phpdb" }, - "time": "2026-01-09T04:38:26+00:00" + "time": "2026-01-23T05:20:35+00:00" }, { "name": "psr/container", @@ -710,16 +710,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495" + "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374", + "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374", "shasum": "" }, "require": { @@ -751,17 +751,17 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1" }, - "time": "2025-08-30T15:50:23+00:00" + "time": "2026-01-12T11:33:04+00:00" }, { "name": "phpstan/phpstan", - "version": "2.1.33", + "version": "2.1.36", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f", - "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2132e5e2361d11d40af4c17faa16f043269a4cf3", + "reference": "2132e5e2361d11d40af4c17faa16f043269a4cf3", "shasum": "" }, "require": { @@ -806,20 +806,20 @@ "type": "github" } ], - "time": "2025-12-05T10:24:31+00:00" + "time": "2026-01-21T13:58:26+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "2.0.11", + "version": "2.0.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "5e30669bef866eff70db8b58d72a5c185aa82414" + "reference": "e4c5a22bf43d3d2bd5a780ad261a622ff62c49a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/5e30669bef866eff70db8b58d72a5c185aa82414", - "reference": "5e30669bef866eff70db8b58d72a5c185aa82414", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/e4c5a22bf43d3d2bd5a780ad261a622ff62c49a4", + "reference": "e4c5a22bf43d3d2bd5a780ad261a622ff62c49a4", "shasum": "" }, "require": { @@ -857,9 +857,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.11" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.12" }, - "time": "2025-12-19T09:05:35+00:00" + "time": "2026-01-22T13:40:00+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1198,16 +1198,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.46", + "version": "11.5.48", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "75dfe79a2aa30085b7132bb84377c24062193f33" + "reference": "fe3665c15e37140f55aaf658c81a2eb9030b6d89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/75dfe79a2aa30085b7132bb84377c24062193f33", - "reference": "75dfe79a2aa30085b7132bb84377c24062193f33", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fe3665c15e37140f55aaf658c81a2eb9030b6d89", + "reference": "fe3665c15e37140f55aaf658c81a2eb9030b6d89", "shasum": "" }, "require": { @@ -1221,7 +1221,7 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0.11", + "phpunit/php-code-coverage": "^11.0.12", "phpunit/php-file-iterator": "^5.1.0", "phpunit/php-invoker": "^5.0.1", "phpunit/php-text-template": "^4.0.1", @@ -1279,7 +1279,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.46" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.48" }, "funding": [ { @@ -1303,7 +1303,7 @@ "type": "tidelift" } ], - "time": "2025-12-06T08:01:15+00:00" + "time": "2026-01-16T16:26:27+00:00" }, { "name": "sebastian/cli-parser", diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index df9a2fd..3cc2eac 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -4,7 +4,6 @@ namespace PhpDb\Adapter\Pgsql; -use PhpDb\Adapter\Adapter; use PhpDb\Adapter\AdapterInterface; use PhpDb\Adapter\Driver\ConnectionInterface; use PhpDb\Adapter\Driver\DriverInterface; @@ -25,7 +24,7 @@ public function __invoke(): array { return [ - 'dependencies' => $this->getDependencies(), + 'dependencies' => $this->getDependencies(), //AdapterInterface::class => $this->getConfig(), ]; } diff --git a/src/Connection.php b/src/Connection.php index bb0fd8f..b3a3f14 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -262,7 +262,7 @@ public function execute($sql): ResultInterface * {@inheritDoc} */ #[Override] - public function getLastGeneratedValue($name = null): bool|int|string|null + public function getLastGeneratedValue(?string $name = null): string|int|false|null { if ($name === null) { return null; diff --git a/src/Pdo/Connection.php b/src/Pdo/Connection.php index 2fecfe3..0840987 100644 --- a/src/Pdo/Connection.php +++ b/src/Pdo/Connection.php @@ -57,13 +57,13 @@ public function connect(): ConnectionInterface&PdoConnectionInterface $options = []; foreach ($this->connectionParameters as $key => $value) { $result = match (strtolower($key)) { - 'dsn' => $dsn = (string) $value, - 'user', 'username' => $username = (string) $value, - 'password', 'pass' => $password = (string) $value, - 'host', 'hostname' => $hostname = (string) $value, - 'port' => $port = (int) $value, - 'dbname', 'database' => $database = (string) $value, - 'unix_socket' => $unixSocket = (string) $value, + 'dsn' => $dsn = (string) $value, + 'user', 'username' => $username = (string) $value, + 'password', 'passwd', 'pw' => $password = (string) $value, + 'host', 'hostname' => $hostname = (string) $value, + 'port' => $port = (int) $value, + 'dbname', 'database', 'db', 'schema' => $database = (string) $value, + 'unix_socket' => $unixSocket = (string) $value, // todo: should we suppport sslmode for pdo pgsql? 'driver_options' => (function (&$options, $value): void { $value = (array) $value; diff --git a/test/unit/Adapter/ConfigProviderTest.php b/test/unit/Adapter/ConfigProviderTest.php index 5b2597e..c539f15 100644 --- a/test/unit/Adapter/ConfigProviderTest.php +++ b/test/unit/Adapter/ConfigProviderTest.php @@ -4,12 +4,11 @@ namespace PhpDbTest\Pgsql; -use Laminas\ServiceManager\Factory\InvokableFactory; use PhpDb\Adapter\Driver\ConnectionInterface; use PhpDb\Adapter\Driver\DriverInterface; +use PhpDb\Adapter\Driver\Pdo\Statement as PdoStatement; use PhpDb\Adapter\Driver\PdoConnectionInterface; use PhpDb\Adapter\Driver\PdoDriverInterface; -use PhpDb\Adapter\Driver\Pdo\Statement as PdoStatement; use PhpDb\Adapter\Pgsql; use PhpDb\Adapter\Pgsql\Pdo\Connection as PdoConnection; use PhpDb\Adapter\Pgsql\Pdo\Driver as PdoDriver;