{"action":"created","issue":{"url":"https://api.github.com/repos/cweagans/composer-patches/issues/34","repository_url":"https://api.github.com/repos/cweagans/composer-patches","labels_url":"https://api.github.com/repos/cweagans/composer-patches/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/cweagans/composer-patches/issues/34/comments","events_url":"https://api.github.com/repos/cweagans/composer-patches/issues/34/events","html_url":"https://github.com/cweagans/composer-patches/issues/34","id":138233331,"number":34,"title":"Patch can not be applied","user":{"login":"yobottehg","id":12897717,"avatar_url":"https://avatars.githubusercontent.com/u/12897717?v=3","gravatar_id":"","url":"https://api.github.com/users/yobottehg","html_url":"https://github.com/yobottehg","followers_url":"https://api.github.com/users/yobottehg/followers","following_url":"https://api.github.com/users/yobottehg/following{/other_user}","gists_url":"https://api.github.com/users/yobottehg/gists{/gist_id}","starred_url":"https://api.github.com/users/yobottehg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yobottehg/subscriptions","organizations_url":"https://api.github.com/users/yobottehg/orgs","repos_url":"https://api.github.com/users/yobottehg/repos","events_url":"https://api.github.com/users/yobottehg/events{/privacy}","received_events_url":"https://api.github.com/users/yobottehg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-03T16:49:29Z","updated_at":"2016-03-03T21:52:36Z","closed_at":null,"body":"i applied some core patches which works for the composer setup.\r\nThen i added a own patch and added this:\r\n\r\nhttp://patches.wondrous.ch/files/acquia_cloud_undefined_index_secret.patch\r\n\r\nThis patches 1 line in core which fixes a notice on acquia hosting.\r\nComposer Patches always tells me that the patch can not be applied, could you perhaps tell me why?\r\n\r\nThe File is on Amazon s3, does it need a special mime type or something?"},"comment":{"url":"https://api.github.com/repos/cweagans/composer-patches/issues/comments/191981612","html_url":"https://github.com/cweagans/composer-patches/issues/34#issuecomment-191981612","issue_url":"https://api.github.com/repos/cweagans/composer-patches/issues/34","id":191981612,"user":{"login":"cweagans","id":101590,"avatar_url":"https://avatars.githubusercontent.com/u/101590?v=3","gravatar_id":"","url":"https://api.github.com/users/cweagans","html_url":"https://github.com/cweagans","followers_url":"https://api.github.com/users/cweagans/followers","following_url":"https://api.github.com/users/cweagans/following{/other_user}","gists_url":"https://api.github.com/users/cweagans/gists{/gist_id}","starred_url":"https://api.github.com/users/cweagans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cweagans/subscriptions","organizations_url":"https://api.github.com/users/cweagans/orgs","repos_url":"https://api.github.com/users/cweagans/repos","events_url":"https://api.github.com/users/cweagans/events{/privacy}","received_events_url":"https://api.github.com/users/cweagans/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T21:52:36Z","updated_at":"2016-03-03T21:52:36Z","body":"Here's the JSON I used:\r\n\r\n```json\r\n\r\n{\r\n  \"name\": \"drupal-composer/drupal-project\",\r\n  \"description\": \"Project template for Drupal 8 projects with composer\",\r\n  \"type\": \"project\",\r\n  \"license\": \"GPL-2.0+\",\r\n  \"config\": {\r\n    \"prefered-install\": \"source\"\r\n  },\r\n  \"repositories\": [\r\n    {\r\n      \"type\": \"composer\",\r\n      \"url\": \"https://packagist.drupal-composer.org\"\r\n    }\r\n  ],\r\n  \"require\": {\r\n    \"composer/installers\": \"^1.0.20\",\r\n    \"cweagans/composer-patches\": \"~1.0\",\r\n    \"drupal/core\": \"8.0.*\"\r\n  },\r\n  \"minimum-stability\": \"dev\",\r\n  \"prefer-stable\": true,\r\n  \"extra\": {\r\n    \"installer-paths\": {\r\n      \"docroot/core\": [\"type:drupal-core\"],\r\n      \"docroot/modules/contrib/{$name}\": [\"type:drupal-module\"],\r\n      \"docroot/themes/contrib/{$name}\": [\"type:drupal-theme\"]\r\n    },\r\n    \"patches\": {\r\n      \"drupal/core\": {\r\n        \"Source Language not set\": \"https://www.drupal.org/files/issues/2595535-28.patch\",\r\n        \"views should not condition join\": \"https://www.drupal.org/files/issues/views-no_joining_langcode_for_untranslatables-2451657-139.patch\",\r\n        \"Acquia undefined Index\": \"http://patches.wondrous.ch/files/acquia_cloud_undefined_index_secret.patch\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nI stripped down your `composer.json` a bit and did some testing with both a local copy of your patch and the remote version (using the link you gave in the issue body above), and both seemed to work okay on an old version of composer that I had installed:\r\n\r\n```\r\n12:34 $ composer --version\r\nComposer version 1.0.0-alpha11 2015-11-14 16:21:07\r\n```\r\n\r\nHowever, when I upgraded to a newer version of Composer, it broke for the remote patch as you said.\r\n\r\n@Seldaek - there seems to be a regression in Composer here somewhere. Is there a straightforward way to narrow down which commit in Composer the regression came from? I'm happy to do the legwork if you have some information about how you'd normally approach this. I didn't see anything that looked relevant in the docs, so if you want to give me a couple bullet points here, I'd be happy to expand it into a documentation page so that other users can go through the same steps in the future."}}