{"action":"opened","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/25671","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/25671/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/25671/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/25671/events","html_url":"https://github.com/owncloud/core/issues/25671","id":168597256,"number":25671,"title":"New Filesystem API: IStorage","user":{"login":"labkode","id":5175912,"avatar_url":"https://avatars.githubusercontent.com/u/5175912?v=3","gravatar_id":"","url":"https://api.github.com/users/labkode","html_url":"https://github.com/labkode","followers_url":"https://api.github.com/users/labkode/followers","following_url":"https://api.github.com/users/labkode/following{/other_user}","gists_url":"https://api.github.com/users/labkode/gists{/gist_id}","starred_url":"https://api.github.com/users/labkode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labkode/subscriptions","organizations_url":"https://api.github.com/users/labkode/orgs","repos_url":"https://api.github.com/users/labkode/repos","events_url":"https://api.github.com/users/labkode/events{/privacy}","received_events_url":"https://api.github.com/users/labkode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-01T08:52:49Z","updated_at":"2016-08-01T08:52:49Z","closed_at":null,"body":"@DeepDiver1975 @PVince81 @icewind1991 @moscicki @NadirRoGue\r\n\r\nHi,\r\nI have taken the latest ownCloud stable version (9.1) and started to prototyping a custom EOS storage on it. I started to implement the methods required by the IStorage interface to create a HomeStorage based on EOS but I have found that there are still core classes that rely on `\\OCP\\Files\\Storage` instead of `\\OCP\\Files\\IStorage`. See trace:\r\n\r\n```\r\nType: TypeError\r\nCode: 0\r\nMessage: Argument 2 passed to OC_Util::{closure}() must implement interface OCP\\Files\\Storage, instance of OC\\Files\\EosStore\\HomeEosStoreStorage given, called in /Applications/MAMP/htdocs/owncloud/lib/private/Files/Storage/StorageFactory.php on line 100\r\nFile: /Applications/MAMP/htdocs/owncloud/lib/private/legacy/util.php\r\nLine: 173\r\n\r\nTrace\r\n#0 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Storage/StorageFactory.php(100): OC_Util::{closure}('/test/', Object(OC\\Files\\EosStore\\HomeEosStoreStorage), Object(OC\\Files\\Mount\\MountPoint))\r\n#1 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Storage/StorageFactory.php(82): OC\\Files\\Storage\\StorageFactory->wrap(Object(OC\\Files\\Mount\\MountPoint), Object(OC\\Files\\EosStore\\HomeEosStoreStorage))\r\n#2 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Mount/MountPoint.php(137): OC\\Files\\Storage\\StorageFactory->getInstance(Object(OC\\Files\\Mount\\MountPoint), '\\\\OC\\\\Files\\\\EosSt...', Array)\r\n#3 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Mount/MountPoint.php(160): OC\\Files\\Mount\\MountPoint->createStorage()\r\n#4 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Filesystem.php(315): OC\\Files\\Mount\\MountPoint->getStorage()\r\n#5 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Filesystem.php(418): OC\\Files\\Filesystem::getStorage('test')\r\n#6 /Applications/MAMP/htdocs/owncloud/lib/private/Files/Filesystem.php(370): OC\\Files\\Filesystem::initMountPoints('test')\r\n#7 /Applications/MAMP/htdocs/owncloud/lib/private/legacy/util.php(255): OC\\Files\\Filesystem::init('test', '/test/files')\r\n#8 /Applications/MAMP/htdocs/owncloud/lib/base.php(890): OC_Util::setupFS()\r\n#9 /Applications/MAMP/htdocs/owncloud/index.php(39): OC::handleRequest()\r\n#10 {main}\r\n```\r\n\r\nI also attach the diagram of storage classes; ideally I would like to have my EOS classes implementing the IStorage and not the Storage interface (that has been deprecated).\r\n![diagram](https://cloud.githubusercontent.com/assets/5175912/17288512/cdf0c41c-57d5-11e6-8e63-466e71a924de.png)\r\n\r\nI think the solution to this problem is to promote the use of IStorage in any class that relies on Storage, but maybe that affects some logic :("}}
{"actor":{"display_login":"labkode"}}