why is an exception thrown for an empty pipeline? Like db.test.aggregate([])? db.test.aggregate([]) works fine directly in mongo See https://github.com/mongodb/mongo-php-library/blob/master/src/Operation/Aggregate.php#L115