{"action":"created","comment":{"url":"https://api.github.com/repos/otoolec/magento2/pulls/comments/29195917","id":29195917,"diff_hunk":"@@ -660,6 +660,9 @@ public function fileUnlock($resource)\n      */\n     public function getAbsolutePath($basePath, $path, $scheme = null)\n     {\n+        if (strlen($path) > 0 && $this->fixSeparator($path)[0] === '/') {","path":"lib/internal/Magento/Framework/Filesystem/Driver/File.php","position":4,"original_position":4,"commit_id":"d69b9bcfd2f4e5e5d6d3b8f54c64c7dc0f950d9e","original_commit_id":"d69b9bcfd2f4e5e5d6d3b8f54c64c7dc0f950d9e","user":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"body":"That's a good point.  I need to review the changes I made here and see if there aren't others I should provide as a standalone fix.  ","created_at":"2015-04-27T21:56:40Z","updated_at":"2015-04-27T21:56:40Z","html_url":"https://github.com/otoolec/magento2/pull/1#discussion_r29195917","pull_request_url":"https://api.github.com/repos/otoolec/magento2/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/comments/29195917"},"html":{"href":"https://github.com/otoolec/magento2/pull/1#discussion_r29195917"},"pull_request":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/otoolec/magento2/pulls/1","id":34087730,"html_url":"https://github.com/otoolec/magento2/pull/1","diff_url":"https://github.com/otoolec/magento2/pull/1.diff","patch_url":"https://github.com/otoolec/magento2/pull/1.patch","issue_url":"https://api.github.com/repos/otoolec/magento2/issues/1","number":1,"state":"open","locked":false,"title":"Module in vendor","user":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"body":"Purpose\r\n======\r\nThis is a simple POC to show how we can have modules live in the vendor directory instead of needing to copy them to app/code. \r\n\r\nInstall\r\n--------\r\n1. Delete modules `Backend` and `Customer`\r\n2. Run `dev/tools/Magento/Tools/Module/createBasicModuleClass.php`\r\n3. Run `composer install` to see how code can be run from the `vendor` directory.\r\n\r\nCaveats\r\n-----------\r\n- The POC can easily be re-written to NOT require a breaking change from a RC perspective.  See Design Thoughts for details.\r\n- The POC focuses only on modules for now and doesn’t do anything for other component types such as themes. \r\n- The POC doesn’t address tools such as our DI compiler, which only scans the ‘app’ directory\r\n\r\nDesign Thoughts\r\n-----------------------\r\nEach module has a Module class that must be named by convention `<namespace>\\<module>\\Module` so that it can be loaded from the fully qualified module name `namespace_module`. The Module class can be asked for various directories of a module, which allows the module to be placed anywhere as long as the class can be autoloaded and as long as the Module can be discovered. \r\n\r\nDiscovering modules is currently done by scanning both `app/code` and `vendor` directories for a `module.xml` file.  \r\n\r\nA possible alternative implementation could be to record the location of the `module.xml` file during the discovery phase, then use that to identify module location instead of a Module class.  Benefits of that approach would be that no code changes are required by developers to get their module to be discoverable. \r\n\r\nThe Module class approach provides an extra layer of abstraction that would allow modules to re-arrange their folder structure.  This could for example allow all production source files to be moved into a `src` folder, all test files moved into a `test` folder and config files to remain in the `etc` folder.  The module composer.json could then add PSR-4 autoload directives that prevent test classes from being loaded during production installs.\r\n\r\nApproach | Can reside anywhere | Avoids copying files | No config/code changes needed | Abstracts internal structure\r\n--------------|------------------------------|-----------------------------------------|--------------------------------|---------\r\n[autoload.files](https://github.com/magento/magento2/pull/1206) | :white_check_mark: | :white_check_mark: | :x: | :x:\r\nModule Interface | :x: | :white_check_mark: | :x: | :white_check_mark:\r\nmodule.xml | :x: | :white_check_mark: | :white_check_mark: | :x:\r\nModule Interface + registry file | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark:\r\n\r\nFurther Work\r\n-----------------\r\nIf we go with the Module class approach then the `lib/internal/Magento/Framework/Module/ModuleList/Loader.php` class and the Setup application should be refactored so that only the Setup application knows about the `vendor` directory. \r\n\r\nIf we go with the module.xml file approach then `lib/internal/Magento/Framework/Module/ModuleList/Loader.php` should be refactored to return the directory in which the module.xml file was found and Setup application should be refactored to store the module location in the `config.php` file.\r\n\r\nIf we go with the Module class and registry file approach then the `magento/magento-composer-installer` will need to be refactored to write installed module names into a registry file.  The `lib/internal/Magento/Framework/Module/ModuleList/Loader.php` class needs to be refactored to read the registry file for a list of installed modules, and use the `lib/internal/Magento/Framework/Module/Dir/Reader.php` file to read the module.xml file.\r\n\r\nThe scripts and tools under `dev` will need to be refactored to use `ModuleListInterface` and \r\n`Magento\\Framework\\Module\\Dir`.\r\n\r\nNotes\r\n--------\r\nAll module file access must be funneled through a class like `lib/internal/Magento/Framework/Module/Dir/Reader.php`\r\n\r\nThis class can iterate over the known modules (can filter based on active if desired) and their directory structure, regardless of where they are. \r\n\r\nExample of interfaces/classes that will help with this effort: \r\n`lib/internal/Magento/Framework/Module/Dir/Reader.php`\r\n`lib/internal/Magento/Framework/Module/Dir.php`\r\n`lib/internal/Magento/Framework/Config/FileResolverInterface.php`\r\n`lib/internal/Magento/Framework/Config/ReaderInterface.php`\r\n`lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/ResolverInterface.php`\r\n\r\nNeeds to be refactored:\r\n`lib/internal/Magento/Framework/Module/Dir/Reader.php`\r\n`app/code/Magento/Email/Model/Template/Config/FileIterator.php`\r\n`lib/internal/Magento/Framework/Module/Dir/ReverseResolver.php`\r\n`lib/internal/Magento/Framework/Module/ModuleList/Loader.php`\r\n`lib/internal/Magento/Framework/View/File/Collector/Base.php`\r\n`lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php`\r\n`lib/internal/Magento/Framework/View/Element/Template.php`","created_at":"2015-04-24T21:27:52Z","updated_at":"2015-04-27T21:56:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/otoolec/magento2/pulls/1/commits","review_comments_url":"https://api.github.com/repos/otoolec/magento2/pulls/1/comments","review_comment_url":"https://api.github.com/repos/otoolec/magento2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/otoolec/magento2/issues/1/comments","statuses_url":"https://api.github.com/repos/otoolec/magento2/statuses/d69b9bcfd2f4e5e5d6d3b8f54c64c7dc0f950d9e","head":{"label":"otoolec:config-in-vendor","ref":"config-in-vendor","sha":"d69b9bcfd2f4e5e5d6d3b8f54c64c7dc0f950d9e","user":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"repo":{"id":34542459,"name":"magento2","full_name":"otoolec/magento2","owner":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otoolec/magento2","description":"All Submissions you make to Magento, an eBay Inc. company (“Magento”) through GitHub are subject to the following terms and conditions: (1)\tYou grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable      license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission”) you submit through GitHub. (2)\tYour Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3)\tYou agree to the Contributor License Agreement found here:  https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html","fork":true,"url":"https://api.github.com/repos/otoolec/magento2","forks_url":"https://api.github.com/repos/otoolec/magento2/forks","keys_url":"https://api.github.com/repos/otoolec/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otoolec/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otoolec/magento2/teams","hooks_url":"https://api.github.com/repos/otoolec/magento2/hooks","issue_events_url":"https://api.github.com/repos/otoolec/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/otoolec/magento2/events","assignees_url":"https://api.github.com/repos/otoolec/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/otoolec/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/otoolec/magento2/tags","blobs_url":"https://api.github.com/repos/otoolec/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otoolec/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otoolec/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/otoolec/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otoolec/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/otoolec/magento2/languages","stargazers_url":"https://api.github.com/repos/otoolec/magento2/stargazers","contributors_url":"https://api.github.com/repos/otoolec/magento2/contributors","subscribers_url":"https://api.github.com/repos/otoolec/magento2/subscribers","subscription_url":"https://api.github.com/repos/otoolec/magento2/subscription","commits_url":"https://api.github.com/repos/otoolec/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/otoolec/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/otoolec/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/otoolec/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/otoolec/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/otoolec/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otoolec/magento2/merges","archive_url":"https://api.github.com/repos/otoolec/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otoolec/magento2/downloads","issues_url":"https://api.github.com/repos/otoolec/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/otoolec/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/otoolec/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/otoolec/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otoolec/magento2/labels{/name}","releases_url":"https://api.github.com/repos/otoolec/magento2/releases{/id}","created_at":"2015-04-24T21:20:43Z","updated_at":"2015-04-24T21:21:21Z","pushed_at":"2015-04-24T21:33:54Z","git_url":"git://github.com/otoolec/magento2.git","ssh_url":"git@github.com:otoolec/magento2.git","clone_url":"https://github.com/otoolec/magento2.git","svn_url":"https://github.com/otoolec/magento2","homepage":"http://www.magento.com","size":189098,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"otoolec:develop","ref":"develop","sha":"b90dafde3319e330148be6442aa0b3b97c77201a","user":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"repo":{"id":34542459,"name":"magento2","full_name":"otoolec/magento2","owner":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otoolec/magento2","description":"All Submissions you make to Magento, an eBay Inc. company (“Magento”) through GitHub are subject to the following terms and conditions: (1)\tYou grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable      license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission”) you submit through GitHub. (2)\tYour Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3)\tYou agree to the Contributor License Agreement found here:  https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html","fork":true,"url":"https://api.github.com/repos/otoolec/magento2","forks_url":"https://api.github.com/repos/otoolec/magento2/forks","keys_url":"https://api.github.com/repos/otoolec/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otoolec/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otoolec/magento2/teams","hooks_url":"https://api.github.com/repos/otoolec/magento2/hooks","issue_events_url":"https://api.github.com/repos/otoolec/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/otoolec/magento2/events","assignees_url":"https://api.github.com/repos/otoolec/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/otoolec/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/otoolec/magento2/tags","blobs_url":"https://api.github.com/repos/otoolec/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otoolec/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otoolec/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/otoolec/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otoolec/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/otoolec/magento2/languages","stargazers_url":"https://api.github.com/repos/otoolec/magento2/stargazers","contributors_url":"https://api.github.com/repos/otoolec/magento2/contributors","subscribers_url":"https://api.github.com/repos/otoolec/magento2/subscribers","subscription_url":"https://api.github.com/repos/otoolec/magento2/subscription","commits_url":"https://api.github.com/repos/otoolec/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/otoolec/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/otoolec/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/otoolec/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/otoolec/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/otoolec/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otoolec/magento2/merges","archive_url":"https://api.github.com/repos/otoolec/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otoolec/magento2/downloads","issues_url":"https://api.github.com/repos/otoolec/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/otoolec/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/otoolec/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/otoolec/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otoolec/magento2/labels{/name}","releases_url":"https://api.github.com/repos/otoolec/magento2/releases{/id}","created_at":"2015-04-24T21:20:43Z","updated_at":"2015-04-24T21:21:21Z","pushed_at":"2015-04-24T21:33:54Z","git_url":"git://github.com/otoolec/magento2.git","ssh_url":"git@github.com:otoolec/magento2.git","clone_url":"https://github.com/otoolec/magento2.git","svn_url":"https://github.com/otoolec/magento2","homepage":"http://www.magento.com","size":189098,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/1"},"html":{"href":"https://github.com/otoolec/magento2/pull/1"},"issue":{"href":"https://api.github.com/repos/otoolec/magento2/issues/1"},"comments":{"href":"https://api.github.com/repos/otoolec/magento2/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/otoolec/magento2/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/otoolec/magento2/statuses/d69b9bcfd2f4e5e5d6d3b8f54c64c7dc0f950d9e"}}}}