{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5518","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5518/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5518/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5518/events","html_url":"https://github.com/composer/composer/pull/5518","id":165820373,"number":5518,"title":"relative path support at providers-url of repo and dist url of package","user":{"login":"mipxtx","id":2456779,"avatar_url":"https://avatars.githubusercontent.com/u/2456779?v=3","gravatar_id":"","url":"https://api.github.com/users/mipxtx","html_url":"https://github.com/mipxtx","followers_url":"https://api.github.com/users/mipxtx/followers","following_url":"https://api.github.com/users/mipxtx/following{/other_user}","gists_url":"https://api.github.com/users/mipxtx/gists{/gist_id}","starred_url":"https://api.github.com/users/mipxtx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipxtx/subscriptions","organizations_url":"https://api.github.com/users/mipxtx/orgs","repos_url":"https://api.github.com/users/mipxtx/repos","events_url":"https://api.github.com/users/mipxtx/events{/privacy}","received_events_url":"https://api.github.com/users/mipxtx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-15T15:55:25Z","updated_at":"2016-09-19T00:30:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/composer/composer/pulls/5518","html_url":"https://github.com/composer/composer/pull/5518","diff_url":"https://github.com/composer/composer/pull/5518.diff","patch_url":"https://github.com/composer/composer/pull/5518.patch"},"body":"I need to access the local repo through a many urls. \r\nThis will add a feature of relative urls with base, provided by client ( \"repositories\": [{\"url\":<url>}... at  composer.json)"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/247894057","html_url":"https://github.com/composer/composer/pull/5518#issuecomment-247894057","issue_url":"https://api.github.com/repos/composer/composer/issues/5518","id":247894057,"user":{"login":"mipxtx","id":2456779,"avatar_url":"https://avatars.githubusercontent.com/u/2456779?v=3","gravatar_id":"","url":"https://api.github.com/users/mipxtx","html_url":"https://github.com/mipxtx","followers_url":"https://api.github.com/users/mipxtx/followers","following_url":"https://api.github.com/users/mipxtx/following{/other_user}","gists_url":"https://api.github.com/users/mipxtx/gists{/gist_id}","starred_url":"https://api.github.com/users/mipxtx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipxtx/subscriptions","organizations_url":"https://api.github.com/users/mipxtx/orgs","repos_url":"https://api.github.com/users/mipxtx/repos","events_url":"https://api.github.com/users/mipxtx/events{/privacy}","received_events_url":"https://api.github.com/users/mipxtx/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T00:30:41Z","updated_at":"2016-09-19T00:30:41Z","body":"We use two different composer repositories for prod and dev. And we not use DNS overrides and other network hacks. In this case we use two different composer.json at dev and prod. It looks like \r\n{\r\n  \"repositories\": [\r\n    {\r\n      \"type\": \"composer\",\r\n      \"url\": \"http://packagist.lan/\"\r\n    },\r\n    {\"packagist\": false}\r\n  ],\r\n  \"config\": { \"secure-http\": false},\r\n  \"require\": {\"mamba/mamba\":\"*\"}\r\n}\r\nfor production and \r\n{\r\n  \"repositories\": [\r\n    {\r\n      \"type\": \"composer\",\r\n      \"url\": \"http://deploy.lan/repo\"\r\n    },\r\n    {\"packagist\": false}\r\n  ],\r\n  \"config\": { \"secure-http\": false},\r\n  \"require\": {\"mamba/mamba\":\"*\"}\r\n} \r\nat dev. \r\nThey differs with the url of composer repo. \r\n\r\ndeploy.lan server is the complex system of ci, git repositories, some testing stuff. Also it contains a composer repository at the subfolder of the root of web server. \r\npackagist.lan is a separate production repo server. Repository located at the root of the web server. This is the main problem: i must generate different packages.json file and includes both for dev and prod servers. \r\nprod packages.json looks like:\r\n{\r\n    \"providers-url\": \"\\/%package%\\/package-%hash%.json\",\r\n    \"providers\": {\r\n        \"phpunit\\/phpunit\": {\r\n            \"sha256\": \"123123\"\r\n        },\r\n    ...\r\n    }\r\n}\r\nand dev packages.json looks like \r\n{\r\n    \"providers-url\": \"\\/repo\\/%package%\\/package-%hash%.json\",\r\n    \"providers\": {\r\n        \"phpunit\\/phpunit\": {\r\n            \"sha256\": \"123123\"\r\n        },\r\n    ...\r\n    }\r\n}\r\njson files of packages is also differs, because it contains links to package versions that begins with \"\\/repo\" at dev and \"\\/\" at prod.\r\n\r\nRelative links helps me to get mirror of dev repository at production network.\r\npackages.json will be looks like \r\n{\r\n    \"providers-url\": \"%package%\\/package-%hash%.json\",\r\n    \"providers\": {\r\n        \"phpunit\\/phpunit\": {\r\n            \"sha256\": \"123123\"\r\n        },\r\n    ...\r\n    }\r\n}\r\n\r\nin this case all files can be downloaded with the base, that described in the composer.json of client.  \"http://deploy.lan/repo/\" + \"%package%\\/package-%hash%.json\" at the dev network and \"http://packagist.lan/\" + \"%package%\\/package-%hash%.json\" at production."}}
{"actor":{"display_login":"mipxtx"}}