From f4f6e94673a7ce7f64525161d21720da7ce327de Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 12 Jun 2023 12:43:11 +0200 Subject: update to 2.2.1 --- PHPINFO | 4 +- REFLECTION | 559 +++++++++++++++++++++++++++++++++++++----------------- php-pecl-pq.spec | 27 +-- pq-upstream.patch | 49 ----- 4 files changed, 396 insertions(+), 243 deletions(-) delete mode 100644 pq-upstream.patch diff --git a/PHPINFO b/PHPINFO index 0dc7e58..c72398e 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,7 +2,7 @@ pq PQ Support => enabled -Extension Version => 2.2.0 +Extension Version => 2.2.1 Used Library => Compiled => Linked -libpq => 12.7 => 12.0.7 +libpq => 14.3 => 14.0.3 diff --git a/REFLECTION b/REFLECTION index 5cfd870..c1a48ff 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #124 pq version 2.2.0 ] { +Extension [ extension #122 pq version 2.2.1 ] { - Dependencies { Dependency [ raphf (Required) ] @@ -46,7 +46,7 @@ Extension [ extension #124 pq version 2.2.0 ] { } } - Class [ class pq\DateTime extends DateTime implements DateTimeInterface, JsonSerializable ] { + Class [ class pq\DateTime extends DateTime implements Stringable, DateTimeInterface, JsonSerializable ] { - Constants [13] { Constant [ public string ATOM ] { Y-m-d\TH:i:sP } @@ -67,14 +67,15 @@ Extension [ extension #124 pq version 2.2.0 ] { - Static properties [0] { } - - Static methods [4] { + - Static methods [5] { Method [ static public method createFromFormat ] { - Parameters [3] { Parameter #0 [ $format ] Parameter #1 [ $datetime ] - Parameter #2 [ DateTimeZone or NULL $object ] + Parameter #2 [ ?DateTimeZone $object = ] } + - Tentative return [ DateTime|false ] } Method [ static public method __set_state ] { @@ -82,149 +83,179 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [1] { Parameter #0 [ array $array ] } + - Tentative return [ DateTime ] } Method [ static public method createFromImmutable ] { - Parameters [1] { - Parameter #0 [ $DateTimeImmutable ] + Parameter #0 [ DateTimeImmutable $object ] } + - Tentative return [ DateTime ] + } + + Method [ static public method createFromInterface ] { + + - Parameters [1] { + Parameter #0 [ DateTimeInterface $object ] + } + - Return [ DateTime ] } Method [ static public method getLastErrors ] { - Parameters [0] { } + - Tentative return [ array|false ] } } - Properties [1] { - Property [ public $format ] + Property [ public $format = 'Y-m-d H:i:s.uO' ] } - Methods [17] { - Method [ public method __toString ] { + Method [ public method __toString ] { - Parameters [0] { } + - Return [ string ] } Method [ public method jsonSerialize ] { - Parameters [0] { } + - Tentative return [ mixed ] } Method [ public method __construct ] { - Parameters [2] { - Parameter #0 [ $time ] - Parameter #1 [ $timezone ] + Parameter #0 [ string $datetime = "now" ] + Parameter #1 [ ?DateTimeZone $timezone = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ public method format ] { - Parameters [1] { - Parameter #0 [ $format ] + Parameter #0 [ string $format ] } + - Tentative return [ string ] } Method [ public method modify ] { - Parameters [1] { - Parameter #0 [ $modify ] + Parameter #0 [ string $modifier ] } + - Tentative return [ DateTime|false ] } Method [ public method add ] { - Parameters [1] { - Parameter #0 [ $interval ] + Parameter #0 [ DateInterval $interval ] } + - Tentative return [ DateTime ] } Method [ public method sub ] { - Parameters [1] { - Parameter #0 [ $interval ] + Parameter #0 [ DateInterval $interval ] } + - Tentative return [ DateTime ] } Method [ public method getTimezone ] { - Parameters [0] { } + - Tentative return [ DateTimeZone|false ] } Method [ public method setTimezone ] { - Parameters [1] { - Parameter #0 [ $timezone ] + Parameter #0 [ DateTimeZone $timezone ] } + - Tentative return [ DateTime ] } Method [ public method getOffset ] { - Parameters [0] { } + - Tentative return [ int ] } Method [ public method setTime ] { - Parameters [4] { - Parameter #0 [ $hour ] - Parameter #1 [ $minute ] - Parameter #2 [ $second ] - Parameter #3 [ $microseconds ] + Parameter #0 [ int $hour ] + Parameter #1 [ int $minute ] + Parameter #2 [ int $second = 0 ] + Parameter #3 [ int $microsecond = 0 ] } + - Tentative return [ DateTime ] } Method [ public method setDate ] { - Parameters [3] { - Parameter #0 [ $year ] - Parameter #1 [ $month ] - Parameter #2 [ $day ] + Parameter #0 [ int $year ] + Parameter #1 [ int $month ] + Parameter #2 [ int $day ] } + - Tentative return [ DateTime ] } Method [ public method setISODate ] { - Parameters [3] { - Parameter #0 [ $year ] - Parameter #1 [ $week ] - Parameter #2 [ $day ] + Parameter #0 [ int $year ] + Parameter #1 [ int $week ] + Parameter #2 [ int $dayOfWeek = 1 ] } + - Tentative return [ DateTime ] } Method [ public method setTimestamp ] { - Parameters [1] { - Parameter #0 [ $unixtimestamp ] + Parameter #0 [ int $timestamp ] } + - Tentative return [ DateTime ] } Method [ public method getTimestamp ] { - Parameters [0] { } + - Tentative return [ int ] } Method [ public method diff ] { - Parameters [2] { - Parameter #0 [ $object ] - Parameter #1 [ $absolute ] + Parameter #0 [ DateTimeInterface $targetObject ] + Parameter #1 [ bool $absolute = false ] } + - Tentative return [ DateInterval ] } } } - Interface [ interface pq\Exception extends Throwable ] { + Interface [ interface pq\Exception extends Throwable, Stringable ] { - Constants [9] { Constant [ public int INVALID_ARGUMENT ] { 0 } @@ -249,32 +280,63 @@ Extension [ extension #124 pq version 2.2.0 ] { - Methods [8] { Method [ abstract public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ abstract public method getCode ] { + + - Parameters [0] { + } } Method [ abstract public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ abstract public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ abstract public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ abstract public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ abstract public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ abstract public method __toString ] { + Method [ abstract public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class pq\Exception\InvalidArgumentException extends InvalidArgumentException implements Throwable, pq\Exception ] { + Class [ class pq\Exception\InvalidArgumentException extends InvalidArgumentException implements Throwable, Stringable, pq\Exception ] { - Constants [9] { Constant [ public int INVALID_ARGUMENT ] { 0 } @@ -295,52 +357,87 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class pq\Exception\RuntimeException extends RuntimeException implements Throwable, pq\Exception ] { + Class [ class pq\Exception\RuntimeException extends RuntimeException implements Stringable, Throwable, pq\Exception ] { - Constants [9] { Constant [ public int INVALID_ARGUMENT ] { 0 } @@ -361,52 +458,87 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class pq\Exception\BadMethodCallException extends BadMethodCallException implements Throwable, pq\Exception ] { + Class [ class pq\Exception\BadMethodCallException extends BadMethodCallException implements Stringable, Throwable, pq\Exception ] { - Constants [9] { Constant [ public int INVALID_ARGUMENT ] { 0 } @@ -427,52 +559,87 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ class pq\Exception\DomainException extends DomainException implements Throwable, pq\Exception ] { + Class [ class pq\Exception\DomainException extends DomainException implements Throwable, Stringable, pq\Exception ] { - Constants [9] { Constant [ public int INVALID_ARGUMENT ] { 0 } @@ -493,48 +660,83 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [5] { - Property [ protected $message ] - Property [ protected $code ] - Property [ protected $file ] - Property [ protected $line ] - Property [ public $sqlstate ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] + Property [ public $sqlstate = NULL ] } - Methods [10] { Method [ public method __construct ] { - Parameters [3] { - Parameter #0 [ $message ] - Parameter #1 [ $code ] - Parameter #2 [ $previous ] + Parameter #0 [ string $message = "" ] + Parameter #1 [ int $code = 0 ] + Parameter #2 [ ?Throwable $previous = null ] } } Method [ public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } Method [ final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getCode ] { + + - Parameters [0] { + } } Method [ final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } Method [ final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } Method [ final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } Method [ final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ public method __toString ] { + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } @@ -576,29 +778,29 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [23] { - Property [ public $status ] - Property [ public $transactionStatus ] - Property [ public $socket ] - Property [ public $errorMessage ] - Property [ public $busy ] - Property [ public $encoding ] - Property [ public $unbuffered ] - Property [ public $nonblocking ] - Property [ public $db ] - Property [ public $user ] - Property [ public $pass ] - Property [ public $host ] - Property [ public $port ] - Property [ public $params ] - Property [ public $options ] - Property [ public $eventHandlers ] - Property [ public $listeners ] - Property [ public $converters ] - Property [ public $defaultFetchType ] - Property [ public $defaultTransactionIsolation ] - Property [ public $defaultTransactionReadonly ] - Property [ public $defaultTransactionDeferrable ] - Property [ public $defaultAutoConvert ] + Property [ public $status = 1 ] + Property [ public $transactionStatus = 4 ] + Property [ public $socket = NULL ] + Property [ public $errorMessage = NULL ] + Property [ public $busy = false ] + Property [ public $encoding = NULL ] + Property [ public $unbuffered = false ] + Property [ public $nonblocking = false ] + Property [ public $db = NULL ] + Property [ public $user = NULL ] + Property [ public $pass = NULL ] + Property [ public $host = NULL ] + Property [ public $port = NULL ] + Property [ public $params = NULL ] + Property [ public $options = NULL ] + Property [ public $eventHandlers = NULL ] + Property [ public $listeners = NULL ] + Property [ public $converters = NULL ] + Property [ public $defaultFetchType = 0 ] + Property [ public $defaultTransactionIsolation = 0 ] + Property [ public $defaultTransactionReadonly = false ] + Property [ public $defaultTransactionDeferrable = false ] + Property [ public $defaultAutoConvert = 65535 ] } - Methods [31] { @@ -606,7 +808,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ $dsn ] - Parameter #1 [ $flags ] + Parameter #1 [ $flags = ] } } @@ -645,7 +847,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ $query ] - Parameter #1 [ $callable ] + Parameter #1 [ $callable = ] } } @@ -654,7 +856,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [3] { Parameter #0 [ $query ] Parameter #1 [ array $params ] - Parameter #2 [ array or NULL $types ] + Parameter #2 [ ?array $types = ] } } @@ -663,8 +865,8 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [4] { Parameter #0 [ $query ] Parameter #1 [ array $params ] - Parameter #2 [ array or NULL $types ] - Parameter #3 [ $callable ] + Parameter #2 [ ?array $types = ] + Parameter #3 [ $callable = ] } } @@ -673,7 +875,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [3] { Parameter #0 [ $name ] Parameter #1 [ $query ] - Parameter #2 [ array or NULL $types ] + Parameter #2 [ ?array $types = ] } } @@ -682,7 +884,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [3] { Parameter #0 [ $name ] Parameter #1 [ $query ] - Parameter #2 [ array or NULL $types ] + Parameter #2 [ ?array $types = ] } } @@ -700,7 +902,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [3] { Parameter #0 [ $name ] Parameter #1 [ $flags ] - Parameter #2 [ $query ] + Parameter #2 [ $query = ] } } @@ -729,8 +931,8 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method listenAsync ] { - Parameters [2] { - Parameter #0 [ $channel ] - Parameter #1 [ $callable ] + Parameter #0 [ $channel = ] + Parameter #1 [ $callable = ] } } @@ -787,25 +989,25 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method startTransaction ] { - Parameters [3] { - Parameter #0 [ $isolation ] - Parameter #1 [ $readonly ] - Parameter #2 [ $deferrable ] + Parameter #0 [ $isolation = ] + Parameter #1 [ $readonly = ] + Parameter #2 [ $deferrable = ] } } Method [ public method startTransactionAsync ] { - Parameters [3] { - Parameter #0 [ $isolation ] - Parameter #1 [ $readonly ] - Parameter #2 [ $deferrable ] + Parameter #0 [ $isolation = ] + Parameter #1 [ $readonly = ] + Parameter #2 [ $deferrable = ] } } Method [ public method trace ] { - Parameters [1] { - Parameter #0 [ $stdio_stream ] + Parameter #0 [ $stdio_stream = ] } } @@ -852,7 +1054,7 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [1] { - Property [ public $connection ] + Property [ public $connection = NULL ] } - Methods [2] { @@ -1044,7 +1246,7 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [1] { - Property [ public $connection ] + Property [ public $connection = NULL ] } - Methods [2] { @@ -1052,22 +1254,22 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ pq\Connection $connection ] - Parameter #1 [ array or NULL $namespaces ] + Parameter #1 [ ?array $namespaces = ] } } Method [ public method refresh ] { - Parameters [1] { - Parameter #0 [ array or NULL $namespaces ] + Parameter #0 [ ?array $namespaces = ] } } } } - Class [ class pq\Result implements Traversable, Countable ] { + Class [ class pq\Result implements IteratorAggregate, Traversable, Countable ] { - - Constants [22] { + - Constants [21] { Constant [ public int EMPTY_QUERY ] { 0 } Constant [ public int COMMAND_OK ] { 1 } Constant [ public int TUPLES_OK ] { 2 } @@ -1087,7 +1289,6 @@ Extension [ extension #124 pq version 2.2.0 ] { Constant [ public int CONV_SCALAR ] { 15 } Constant [ public int CONV_ARRAY ] { 16 } Constant [ public int CONV_DATETIME ] { 32 } - Constant [ public int CONV_JSON ] { 256 } Constant [ public int CONV_BYTEA ] { 8 } Constant [ public int CONV_ALL ] { 65535 } } @@ -1099,18 +1300,18 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [9] { - Property [ public $status ] - Property [ public $statusMessage ] - Property [ public $errorMessage ] - Property [ public $diag ] - Property [ public $numRows ] - Property [ public $numCols ] - Property [ public $affectedRows ] - Property [ public $fetchType ] - Property [ public $autoConvert ] + Property [ public $status = NULL ] + Property [ public $statusMessage = NULL ] + Property [ public $errorMessage = NULL ] + Property [ public $diag = NULL ] + Property [ public $numRows = 0 ] + Property [ public $numCols = 0 ] + Property [ public $affectedRows = 0 ] + Property [ public $fetchType = 0 ] + Property [ public $autoConvert = 65535 ] } - - Methods [9] { + - Methods [10] { Method [ public method bind ] { - Parameters [2] { @@ -1128,7 +1329,7 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method fetchRow ] { - Parameters [1] { - Parameter #0 [ $fetch_type ] + Parameter #0 [ $fetch_type = ] } } @@ -1136,21 +1337,21 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ &$ref ] - Parameter #1 [ $col ] + Parameter #1 [ $col = ] } } Method [ public method fetchAll ] { - Parameters [1] { - Parameter #0 [ $fetch_type ] + Parameter #0 [ $fetch_type = ] } } Method [ public method fetchAllCols ] { - Parameters [1] { - Parameter #0 [ $col ] + Parameter #0 [ $col = ] } } @@ -1158,14 +1359,15 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [0] { } + - Tentative return [ int ] } Method [ public method map ] { - Parameters [3] { - Parameter #0 [ $keys ] - Parameter #1 [ $vals ] - Parameter #2 [ $fetch_type ] + Parameter #0 [ $keys = ] + Parameter #1 [ $vals = ] + Parameter #2 [ $fetch_type = ] } } @@ -1174,6 +1376,13 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [0] { } } + + Method [ public method getIterator ] { + + - Parameters [0] { + } + - Tentative return [ Traversable ] + } } } @@ -1189,10 +1398,10 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ public $name ] - Property [ public $connection ] - Property [ public $query ] - Property [ public $types ] + Property [ public $name = NULL ] + Property [ public $connection = NULL ] + Property [ public $query = NULL ] + Property [ public $types = NULL ] } - Methods [10] { @@ -1202,8 +1411,8 @@ Extension [ extension #124 pq version 2.2.0 ] { Parameter #0 [ pq\Connection $connection ] Parameter #1 [ $name ] Parameter #2 [ $query ] - Parameter #3 [ array or NULL $types ] - Parameter #4 [ $async ] + Parameter #3 [ ?array $types = ] + Parameter #4 [ $async = ] } } @@ -1243,15 +1452,15 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method exec ] { - Parameters [1] { - Parameter #0 [ array or NULL $params ] + Parameter #0 [ ?array $params = ] } } Method [ public method execAsync ] { - Parameters [2] { - Parameter #0 [ array or NULL $params ] - Parameter #1 [ $callable ] + Parameter #0 [ ?array $params = ] + Parameter #1 [ $callable = ] } } @@ -1284,10 +1493,10 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ public $connection ] - Property [ public $isolation ] - Property [ public $readonly ] - Property [ public $deferrable ] + Property [ public $connection = NULL ] + Property [ public $isolation = NULL ] + Property [ public $readonly = false ] + Property [ public $deferrable = false ] } - Methods [16] { @@ -1295,10 +1504,10 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [5] { Parameter #0 [ pq\Connection $connection ] - Parameter #1 [ $async ] - Parameter #2 [ $isolation ] - Parameter #3 [ $readonly ] - Parameter #4 [ $deferrable ] + Parameter #1 [ $async = ] + Parameter #2 [ $isolation = ] + Parameter #3 [ $readonly = ] + Parameter #4 [ $deferrable = ] } } @@ -1368,14 +1577,14 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ $oid ] - Parameter #1 [ $mode ] + Parameter #1 [ $mode = ] } } Method [ public method createLOB ] { - Parameters [1] { - Parameter #0 [ $mode ] + Parameter #0 [ $mode = ] } } @@ -1390,7 +1599,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ $local_path ] - Parameter #1 [ $oid ] + Parameter #1 [ $oid = ] } } @@ -1421,10 +1630,10 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ public $name ] - Property [ public $connection ] - Property [ public $query ] - Property [ public $flags ] + Property [ public $name = NULL ] + Property [ public $connection = NULL ] + Property [ public $query = NULL ] + Property [ public $flags = NULL ] } - Methods [9] { @@ -1435,7 +1644,7 @@ Extension [ extension #124 pq version 2.2.0 ] { Parameter #1 [ $name ] Parameter #2 [ $flags ] Parameter #3 [ $query ] - Parameter #4 [ $async ] + Parameter #4 [ $async = ] } } @@ -1473,23 +1682,23 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method move ] { - Parameters [1] { - Parameter #0 [ $spec ] + Parameter #0 [ $spec = ] } } Method [ public method fetchAsync ] { - Parameters [2] { - Parameter #0 [ $spec ] - Parameter #1 [ $callback ] + Parameter #0 [ $spec = ] + Parameter #1 [ $callback = ] } } Method [ public method moveAsync ] { - Parameters [2] { - Parameter #0 [ $spec ] - Parameter #1 [ $callback ] + Parameter #0 [ $spec = ] + Parameter #1 [ $callback = ] } } } @@ -1509,10 +1718,10 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [4] { - Property [ public $connection ] - Property [ public $expression ] - Property [ public $direction ] - Property [ public $options ] + Property [ public $connection = NULL ] + Property [ public $expression = NULL ] + Property [ public $direction = NULL ] + Property [ public $options = NULL ] } - Methods [4] { @@ -1522,7 +1731,7 @@ Extension [ extension #124 pq version 2.2.0 ] { Parameter #0 [ pq\Connection $connection ] Parameter #1 [ $expression ] Parameter #2 [ $direction ] - Parameter #3 [ $options ] + Parameter #3 [ $options = ] } } @@ -1536,7 +1745,7 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method end ] { - Parameters [1] { - Parameter #0 [ $error ] + Parameter #0 [ $error = ] } } @@ -1565,9 +1774,9 @@ Extension [ extension #124 pq version 2.2.0 ] { } - Properties [3] { - Property [ public $transaction ] - Property [ public $oid ] - Property [ public $stream ] + Property [ public $transaction = NULL ] + Property [ public $oid = 0 ] + Property [ public $stream = NULL ] } - Methods [6] { @@ -1575,8 +1784,8 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [3] { Parameter #0 [ pq\Transaction $transaction ] - Parameter #1 [ $oid ] - Parameter #2 [ $mode ] + Parameter #1 [ $oid = ] + Parameter #2 [ $mode = ] } } @@ -1590,8 +1799,8 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method read ] { - Parameters [2] { - Parameter #0 [ $length ] - Parameter #1 [ &$read ] + Parameter #0 [ $length = ] + Parameter #1 [ &$read = ] } } @@ -1599,7 +1808,7 @@ Extension [ extension #124 pq version 2.2.0 ] { - Parameters [2] { Parameter #0 [ $offset ] - Parameter #1 [ $whence ] + Parameter #1 [ $whence = ] } } @@ -1612,7 +1821,7 @@ Extension [ extension #124 pq version 2.2.0 ] { Method [ public method truncate ] { - Parameters [1] { - Parameter #0 [ $length ] + Parameter #0 [ $length = ] } } } diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec index a4ff3cb..1eac230 100644 --- a/php-pecl-pq.spec +++ b/php-pecl-pq.spec @@ -1,7 +1,7 @@ # remirepo spec file for php-pecl-pq # -# Copyright (c) 2014-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2014-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -26,19 +26,17 @@ Summary: PostgreSQL client library (libpq) binding Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 2.2.0 +Version: 2.2.1 %if 0%{?gh_date:1} -Release: 0.12.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif -License: BSD +License: BSD-2-Clause URL: https://pecl.php.net/package/%{pecl_name} -Patch0: %{pecl_name}-upstream.patch - %if 0%{?fedora} >= 29 && 0%{?rhel} >= 8 BuildRequires: libpq-devel > 9 %else @@ -66,7 +64,7 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff %if "%{php_version}" > "7.2" Obsoletes: php72u-pecl-%{pecl_name} <= %{version} @@ -77,12 +75,6 @@ Obsoletes: php73-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} %endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif %endif @@ -115,8 +107,6 @@ sed -e '/role="test"/d' \ -i package.xml cd NTS -%patch0 -p1 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -288,6 +278,9 @@ exit $RET %changelog +* Fri Mar 3 2023 Remi Collet - 2.2.1-1 +- update to 2.2.1 + * Thu Sep 8 2022 Remi Collet - 2.2.0-8 - add upstream patch for 8.2 and from https://github.com/m6w6/ext-pq/pull/44 diff --git a/pq-upstream.patch b/pq-upstream.patch deleted file mode 100644 index f4fbb3d..0000000 --- a/pq-upstream.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 64cc2702825f663e8da413dab235d18145f073b7 Mon Sep 17 00:00:00 2001 -From: Michael Wallner -Date: Wed, 10 Nov 2021 10:12:57 +0100 -Subject: [PATCH] PHP-8.2 compat with __toString - ---- - src/php_pq_misc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/php_pq_misc.c b/src/php_pq_misc.c -index 70f32da..9acef34 100644 ---- a/src/php_pq_misc.c -+++ b/src/php_pq_misc.c -@@ -138,7 +138,11 @@ ZEND_END_ARG_INFO() - #define ai_pqdt_jsonserialize ai_pqdt_to_string - #endif - -+#if PHP_VERSION_ID >= 80200 -+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_pqdt_to_string, 0, 0, IS_STRING, 0) -+#else - ZEND_BEGIN_ARG_INFO_EX(ai_pqdt_to_string, 0, 0, 0) -+#endif - ZEND_END_ARG_INFO(); - static PHP_METHOD(pqdt, __toString) - { - -From e518cb365f1e28dd4779ce37888a89ac54278c65 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 8 Sep 2022 17:24:42 +0200 -Subject: [PATCH] allow dynamic properties in Pq\Connection - ---- - src/php_pqconn.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/php_pqconn.c b/src/php_pqconn.c -index 6278323..0b39d25 100644 ---- a/src/php_pqconn.c -+++ b/src/php_pqconn.c -@@ -2001,6 +2001,9 @@ PHP_MINIT_FUNCTION(pqconn) - INIT_NS_CLASS_ENTRY(ce, "pq", "Connection", php_pqconn_methods); - php_pqconn_class_entry = zend_register_internal_class_ex(&ce, NULL); - php_pqconn_class_entry->create_object = php_pqconn_create_object; -+#if PHP_VERSION_ID >= 80200 -+ php_pqconn_class_entry->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; -+#endif - - memcpy(&php_pqconn_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - php_pqconn_object_handlers.offset = XtOffsetOf(php_pqconn_object_t, zo); -- cgit