Bug #81464 [Opn->Nab]: Regression: pgsql resource types
| From: | girgias@php.net | Date: | Tue, 21 Sep 2021 16:21:34 +0000 |
| Subject: | Bug #81464 [Opn->Nab]: Regression: pgsql resource types | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236732@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81464&edit=1
ID: 81464
Updated by: girgias@php.net
Reported by: weierophinney@php.net
Summary: Regression: pgsql resource types
-Status: Open
+Status: Not a bug
Type: Bug
Package: PostgreSQL related
Operating System: Ubuntu 20.04
PHP Version: 8.1.0RC2
Block user comment: N
Private report: N
New Comment:
This is expected, is documented in UPGRADING, and will be documented in the migration guide.
Previous Comments:
------------------------------------------------------------------------
[2021-09-21 16:18:14] weierophinney@php.net
Description:
------------
In all prior releases of PHP, the Postgres resources were as stated on https://www.php.net/manual/en/resource.php
With the merging of https://github.com/php/php-src/pull/6791, PHP
8.1.0 is changing pgsql resources into resource objects. This breaks existing code that is checking
for the old resource types as currently documented.
As such, this is a BC BREAK in a minor version.
Test script:
---------------
$pgsql = pg_connect($validConnectionString);
echo get_resource_type($pgsql), "\n";
$pgResult = pg_query($pgsql, $someValidSql);
echo get_resource_type($pgResult), "\n";
Expected result:
----------------
pgsql link
pgsql result
Actual result:
--------------
PgSql\Connection
PgSql\Result
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81464&edit=1