Mock requests no longer supported in 3.1.2-4

in the Fidus Writer plugin, we allow users to do some action on the OJS site while they are really on the Fidus Writer site. For this to work with the various built-in OJS functions, we created a fake request as a mock object that contains all the functions and attributes that the request would normally have. See here:

That worked fine until fairly recently. But now I see that a user who is on OJS 3.1.2-4 sees an error message saying

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to NotificationManagerDelegate::createNotification() must be an instance of PKPRequest, instance of MockObject given,


What is the preferred way to create such fake requests currently? Is there a way to write it so that it can work at least with all sub versions of OJS 3.1.2?