I have just shifted from the old mongo extension to the newest PHP driver (mongodb). I'm also using the PHP library provided for mongodb.
Previously, I could simply do ->sort()
on a cursor instance, but that doesn't seem to be the case anymore 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? Help would be appreciated.