I just switched from the old Mongo extension to the latest PHP driver (mongodb). I also use the PHP library provided for mongodb.
Previously, I could just do ->sort()for the cursor instance, but this is no longer the case since I get this error:
Fatal error: Uncaught Error: Call to undefined method MongoDB\Driver\Cursor::sort()
What is the alternative to sorting / limiting / skipping now?
source
share