When building against PHP 8.1, php-mongodb 1.9.0+1.7.5-2 FTBFS due to
some deprecated functions. I also checked the 1.10.0 version currently
staged in Debian's git repository but it has the same failures. For
example, one of the errors is:
/<<BUILDDIR>>/php-mongodb-1.9.0+1.7.5/build-8.1/src/MongoDB/BulkWrite.c:672:59: error: ‘spl_ce_Countable’ undeclared (first use in this function); did you mean ‘zend_ce_countable’?
672 | zend_class_implements(php_phongo_bulkwrite_ce, 1, spl_ce_Countable);
| ^~~~~~~~~~~~~~~~
| zend_ce_countable
See https://launchpadlibrarian.net/566491878/buildlog_ubuntu-jammy-amd64.php-mongodb_1.9.0+1.7.5-2build3_BUILDING.txt.gz
There are fixes for these issues in upstream's tree, for instance the
above is fixed by:
https://github.com/mongodb/mongo-php-driver/commit/00e8f089e2cf688844ebc7ded5707c6c4554078b.patch
https://jira.mongodb.org/browse/PHPC-1793
However, it might be better to pull the 1.11.0 release, since there's
been several changes for PHP 8.1.