{"action":"created","issue":{"url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/1","labels_url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/1/comments","events_url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/1/events","html_url":"https://github.com/Letudiant/composer-shared-package-plugin/issues/1","id":68067784,"number":1,"title":"Problem with symlinks over Vagrant shared folders","user":{"login":"philbates35","id":4882082,"avatar_url":"https://avatars.githubusercontent.com/u/4882082?v=3","gravatar_id":"","url":"https://api.github.com/users/philbates35","html_url":"https://github.com/philbates35","followers_url":"https://api.github.com/users/philbates35/followers","following_url":"https://api.github.com/users/philbates35/following{/other_user}","gists_url":"https://api.github.com/users/philbates35/gists{/gist_id}","starred_url":"https://api.github.com/users/philbates35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbates35/subscriptions","organizations_url":"https://api.github.com/users/philbates35/orgs","repos_url":"https://api.github.com/users/philbates35/repos","events_url":"https://api.github.com/users/philbates35/events{/privacy}","received_events_url":"https://api.github.com/users/philbates35/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-13T10:54:22Z","updated_at":"2015-04-13T11:50:14Z","closed_at":null,"body":"Just trying to get this set up and I've come across a problem with the symlinks.\r\n\r\nI use Vagrant with NFS shared folders as my development environment. My local folder structure is:\r\n\r\n```\r\n~ \r\n---- code\r\n--------www\r\n------------project1\r\n------------project2\r\n--------packages (your plugin's vendor-dir where the packages are downloaded to)\r\n------------mycompany\r\n----------------mycompanypackage1\r\n----------------mycompanypackage2\r\n```\r\n\r\nI have the following Vagrant shared folders:\r\n\r\n```\r\n~/code/www --> /home/www\r\n```\r\n```\r\n~/code/packages --> /home/packages\r\n```\r\n\r\nMeaning the folder structure on my VM is very similar to local, but ever so slightly different:\r\n\r\n```\r\nhome\r\n----www\r\n--------project1\r\n--------project2\r\n----packages (your plugin's vendor-dir where the packages are downloaded to)\r\n--------mycompany\r\n------------mycompanypackage1\r\n------------mycompanypackage2\r\n```\r\n\r\nIn my project root I have:\r\n\r\n```\r\n\"shared-package\": {\r\n    \"vendor-dir\": \"../../packages\"\r\n}\r\n```\r\n\r\nAlthough the local and VM folder hierarchy is slightly different, the relative vendor-dir I provided is perfectly valid for both my VM and local directory structures.\r\n\r\nThe problem is with the symlink that is created:\r\n\r\n```\r\nwww/projectroot/venor-shared/mycompany/package1 -> /home/packages/mycompany/package1/dev-default/\r\n```\r\n\r\nOn the VM this is a valid symlink. However, on my local the symlink is seen as broken as the target doesn't exist (`/home/packages/mycompany/package1/dev-default/` which is a valid directory on the VM doesn't exist on the local filesystem, and should instead be `~/code/packages/mycompany/package1/dev-default/`). This means locally, PhpStorm and the filesystem thinks the link is broken and I can't click through to the package.\r\n\r\nThe solution would be to generate the symlink relative to the vendor-shared folder:\r\n```\r\nproject1/vendor-shared/mycompany/package1 -> ../../../../../packages/mycompany/package1/dev-default/\r\n```\r\n\r\nI imagine I'm not the only person using Vagrant shared folders with slightly different directory structures on VM and local, and I think this would cause issues for everyone with that set up. Can you think of a way that the symlink that is generated could be relative to the vendor-shared directory rather than absolute?\r\n\r\nHappy to provide more explanation or information if required.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/comments/92324871","html_url":"https://github.com/Letudiant/composer-shared-package-plugin/issues/1#issuecomment-92324871","issue_url":"https://api.github.com/repos/Letudiant/composer-shared-package-plugin/issues/1","id":92324871,"user":{"login":"Divi","id":1122160,"avatar_url":"https://avatars.githubusercontent.com/u/1122160?v=3","gravatar_id":"","url":"https://api.github.com/users/Divi","html_url":"https://github.com/Divi","followers_url":"https://api.github.com/users/Divi/followers","following_url":"https://api.github.com/users/Divi/following{/other_user}","gists_url":"https://api.github.com/users/Divi/gists{/gist_id}","starred_url":"https://api.github.com/users/Divi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Divi/subscriptions","organizations_url":"https://api.github.com/users/Divi/orgs","repos_url":"https://api.github.com/users/Divi/repos","events_url":"https://api.github.com/users/Divi/events{/privacy}","received_events_url":"https://api.github.com/users/Divi/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T11:50:14Z","updated_at":"2015-04-13T11:50:14Z","body":"Hey @philbates35 \r\n\r\nI use this plugin with Vagrant too, but with a synced_folder as `vendor-dir`.  \r\nThe relative path for symlink is not a bad idea, but I'm afraid that Composer has some issues with relative symlink, but I'll try it.\r\n\r\nThanks :+1: "}}