m6w6 / ext-pq

PostgreSQL client library (libpq) binding
BSD 2-Clause "Simplified" License
39 stars 7 forks source link

Incompatible with PHP 8 #36

Closed codercms closed 4 years ago

codercms commented 4 years ago

When extension is loaded it fails with this error - Fatal error: Class pq\Result must implement interface Traversable as part of either Iterator or IteratorAggregate in Unknown on line 0

php -v

PHP 8.0.0beta3 (cli) (built: Sep 12 2020 08:32:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies

php --ini

php --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini
Scan for additional .ini files in: /usr/local/php8/lib/conf.d
Additional .ini files parsed:      /usr/local/php8/lib/conf.d/20-raphf.ini,
/usr/local/php8/lib/conf.d/30-pq.ini

php.ini:

extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20200804/

PHP configure options:

./configure --enable-opcache --with-zlib --with-zip --enable-sockets --with-pear --with-curl --enable-pdo --with-pdo-pgsql --with-openssl --enable-pcntl --with-pgsql --with-config-file-scan-dir=/usr/local/php8/lib/conf.d
m6w6 commented 4 years ago

Thanks. Fixed in master; preparing release.

codercms commented 4 years ago

@m6w6 thanks for the fix :) 👍