Mock requests no longer supported in 3.1.2-4

Hey,
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: https://github.com/fiduswriter/ojs-fiduswriter/blob/3088f24ced4d98e1cf27014d669d497b1552b45e/FidusWriterGatewayPlugin.inc.php#L429-L467

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,

See https://github.com/fiduswriter/ojs-fiduswriter/issues/10

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?