Change self to static in file SMTP/Factory.php and RemoteStorage/Factory.php for overwriting.