Summary
Pgsql\Result no longer satisfies PhpDb\Adapter\Driver\ResultInterface. php-db/phpdb#172 added getQueryResult() to the interface (commit 6a14886), and this package does not implement it, so loading the class is a fatal:
Fatal error: Class PhpDb\Pgsql\Result contains 1 abstract method and must therefore be
declared abstract or implement the remaining methods
(PhpDb\Adapter\Driver\ResultInterface::getQueryResult) in src/Result.php on line 17
This happens before any test runs, so composer update followed by composer test fails outright.
The added signature is:
public function getQueryResult(?ResultSetInterface $resultPrototype = null): ResultSetInterface;
It replaces the clone/initialize logic that previously lived in Adapter.
Proposed change
Implement the method on Pgsql\Result, following Adapter\Driver\Pdo\Result upstream:
#[Override]
public function getQueryResult(?ResultSetInterface $resultPrototype = null): ResultSetInterface
{
if (! $this->isQueryResult()) {
throw new Exception\RuntimeException(
'Cannot produce a query result set from a result that is not a query result;'
. ' check isQueryResult() first',
);
}
$resultPrototype ??= new ResultSet();
$resultSet = clone $resultPrototype;
$resultSet->initialize($this);
return $resultSet;
}
isQueryResult() already exists here as pg_num_fields($this->resource) > 0, so the guard works as-is. Needs coverage for both branches.
Notes
#11 pins composer.lock to the older php-db/phpdb reference (81844a5) to avoid the fatal, which is a stopgap: the latest legs of the new matrix resolve 0.6.x-dev fresh and will fail, and the lock cannot move forward until this is fixed.
phpdb-mysql has no getQueryResult() either and its lock is pinned to an older reference again (e037464), so the same break is likely waiting there.
Summary
Pgsql\Resultno longer satisfiesPhpDb\Adapter\Driver\ResultInterface. php-db/phpdb#172 addedgetQueryResult()to the interface (commit6a14886), and this package does not implement it, so loading the class is a fatal:This happens before any test runs, so
composer updatefollowed bycomposer testfails outright.The added signature is:
It replaces the clone/initialize logic that previously lived in
Adapter.Proposed change
Implement the method on
Pgsql\Result, followingAdapter\Driver\Pdo\Resultupstream:isQueryResult()already exists here aspg_num_fields($this->resource) > 0, so the guard works as-is. Needs coverage for both branches.Notes
#11 pins
composer.lockto the olderphp-db/phpdbreference (81844a5) to avoid the fatal, which is a stopgap: thelatestlegs of the new matrix resolve0.6.x-devfresh and will fail, and the lock cannot move forward until this is fixed.phpdb-mysqlhas nogetQueryResult()either and its lock is pinned to an older reference again (e037464), so the same break is likely waiting there.