【发布时间】:2018-07-26 06:01:42
【问题描述】:
我们的应用程序在(非常)旧的 MongoDB 2.4 集群上运行 - 目前无法将其升级到新版本。
我们正在努力将我们的应用程序从 PHP 5.6 升级到 PHP7,在 the version 1.4.0 of the mongodb driver deprecated MongoDB 2.4 support 之前一切正常。
由于我们需要支持2.4,所以我尝试将驱动程序版本回滚到1.3.0和1.3.2,它们都抛出了这个错误:
Call to undefined method MongoDB\Driver\Server::executeReadCommand()
这个executeReadCommand() 似乎是来自1.4.0 的东西,但如果我使用的是1.3.0 版本,那怎么可能呢?我错过了什么吗?
PHP 配置:
PHP 7.1.12 (cli) (built: Dec 1 2017 01:55:23) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.12, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
Mongo 驱动配置:
root@6f40fb118d2d:/var/www/app# php --ri mongodb | grep version
MongoDB extension version => 1.3.0
libbson bundled version => 1.8.0
libmongoc bundled version => 1.8.0
【问题讨论】:
标签: php mongodb composer-php php-7