laminas / laminas-db

Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
https://docs.laminas.dev/laminas-db/
BSD 3-Clause "New" or "Revised" License
119 stars 66 forks source link

Recognize pgsql resource objects when running in PHP 8.1 #212

Closed weierophinney closed 2 years ago

weierophinney commented 2 years ago

Per:

The pgsql functions now accept and return resource objects and not resources. As such, the return value of get_resource_type() varies, and technically, in PHP 8.1, we should not use is_resource(), but a typecheck instead. However, we still need to support pre-8.1 code as well.

weierophinney commented 2 years ago

Ping @Ocramius and @boesing

weierophinney commented 2 years ago

Related to laminas/laminas-session#45

weierophinney commented 2 years ago

The relevant thing to compare is this:

to this:

Specifically, note that the previous run skipped a test; this was the pgsql integration test. It's no longer skipped.