PHP MongoDB - Use of the aggregate command without the cursor option is deprecated. What?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have updated mongo and now in the log the following error appears: Use of the aggregate command without the cursor option is deprecated Mongo says that I should put a second REQUIRED parameter to aggregate function, because my current usage is deprecated. I currently use the following code PHP (now is deprecated): $this->db->{$collection}->aggregate($options); And return this format: {"result":[ { "_id":"xxxxxx", "update":[ { "firstUpdateTime":xxxxxx, "updateTime":xxxxxxx, } ], "media":[ { "xxxx":{ ... To not use an deprecated code I add