Comments (7)
Sure, I can take a look. Can you please post your complete composer.json
? If you don't want to post it publicly, you're welcome to email it to [email protected].
Without seeing your composer.json, it'll be fairly difficult to debug, but you mentioned that you have applied "core patches", which I'm assuming means multiple patches to Drupal core. It's possible that the order that you're applying the patches in could matter - if two patches are applied to the same file, perhaps there's some overlap and that confuses patch
. See also #28
As far as the mime type or hosting setup - composer-patches doesn't care. It should "just work".
from composer-patches.
Hei, thanks for the response.
Sure i can post the composer json, just to be clear. If i add the files locally, like you will see in the composer json it works. it just doesn't work for the files on s3.
Heres a little bit censored composer.json:
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0+",
"authors": [
{
"name": "",
"role": ""
}
],
"config": {
"github-oauth": {
"github.com": "xxxxxxx"
},
"prefered-install": "source"
},
"repositories": [
{
"type": "composer",
"url": "https://packagist.drupal-composer.org"
},
{
"type": "vcs",
"url": "[email protected]:md-systems/redirect.git"
}
],
"require": {
"composer/installers": "^1.0.20",
"cweagans/composer-patches": "~1.0",
"drupal/core": "8.0.*",
"drupal/console": "~0.10",
"drupal/file_entity": "8.2.*",
"drupal/pathauto": "8.1.*",
"drupal/redirect": "*",
"drupal/paragraphs": "8.1.*",
"drupal/simple_sitemap": "8.2.*"
},
"require-dev": {
"behat/mink": "~1.6",
"behat/mink-goutte-driver": "~1.2",
"jcalderonzumba/gastonjs": "^1.1@dev",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
"mikey179/vfsStream": "~1.2",
"phpunit/phpunit": "~4.8",
"symfony/css-selector": "2.7.*"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-install-cmd": "sh ./scripts/composer/post-install.sh"
},
"extra": {
"installer-paths": {
"docroot/core": ["type:drupal-core"],
"docroot/modules/contrib/{$name}": ["type:drupal-module"],
"docroot/themes/contrib/{$name}": ["type:drupal-theme"]
},
"patches": {
"drupal/core": {
"Source Language not set": "https://www.drupal.org/files/issues/2595535-28.patch",
"views should not condition join": "https://www.drupal.org/files/issues/views-no_joining_langcode_for_untranslatables-2451657-139.patch",
"Acquia undefined Index": "patches/acquia_cloud_undefined_index_secret.patch"
},
"drupal/paragraphs": {
"Entity Changed Constraint Validation": "https://www.drupal.org/files/issues/paragraphs-EntityChangedConstraintValidator-FixAndTest-2631590-16.patch"
},
"drupal/file_entity": {
"Mime Types Changed": "patches/file_entity_mime_type.patch",
"Use Throbber instead of progress bar": "patches/file_entity_throbber_icon.patch"
}
}
}
}
from composer-patches.
Here's the JSON I used:
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0+",
"config": {
"prefered-install": "source"
},
"repositories": [
{
"type": "composer",
"url": "https://packagist.drupal-composer.org"
}
],
"require": {
"composer/installers": "^1.0.20",
"cweagans/composer-patches": "~1.0",
"drupal/core": "8.0.*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"docroot/core": ["type:drupal-core"],
"docroot/modules/contrib/{$name}": ["type:drupal-module"],
"docroot/themes/contrib/{$name}": ["type:drupal-theme"]
},
"patches": {
"drupal/core": {
"Source Language not set": "https://www.drupal.org/files/issues/2595535-28.patch",
"views should not condition join": "https://www.drupal.org/files/issues/views-no_joining_langcode_for_untranslatables-2451657-139.patch",
"Acquia undefined Index": "http://patches.wondrous.ch/files/acquia_cloud_undefined_index_secret.patch"
}
}
}
}
I 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:
12:34 $ composer --version
Composer version 1.0.0-alpha11 2015-11-14 16:21:07
However, when I upgraded to a newer version of Composer, it broke for the remote patch as you said.
@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.
from composer-patches.
Thanks for testing, heres my version i used:
Composer version 1.0-dev (cc14bb3ba99eaf2b1ee45bf292962551b4f1436d) 2016-02-29 19:10:08
i did an update to the latest stable release form yesterday ( beta1 )
Composer version 1.0.0-beta1 2016-03-03 15:15:10
And the error is still there.
from composer-patches.
I read the release notes of beta1.
there is one big break:
By default we now disable any non-secure protocols (http, git, svn). This may lead to issues if you rely on those. See secure-http config option.
So if i set secure-http to false it works. Not a composer bug, just me using non TLS Amazon S3.
from composer-patches.
Just FYI, we do throw an exception with a clear message when this limitation blocks a request: https://github.com/composer/composer/blob/master/src/Composer/Util/RemoteFilesystem.php#L271
I don't know how it "failed to apply the patch" for you, but if it didn't include the root cause that might be something that can be improved in the error reporting of this plugin.
from composer-patches.
Ah, okay. So the fix here is to just fix error reporting (and apparently get me in the habit of reading release notes instead of throwing around nasty words like "regression" and "think". :P). Thanks gents. I'll get this squared away today.
from composer-patches.
Related Issues (20)
- Should not uninstall packages when Composer is called with --no-install HOT 2
- [Bug or new feature] Add support for local patch files and external patch file in dependencies HOT 10
- Clear error-message if patch is not available HOT 7
- How to apply patches from URL to a private GitHub repo? HOT 2
- PHP 8.2 support HOT 7
- SIMPLE example HOT 1
- When installing Drupal module metatag version: '8.x-1.19' module, the sub module metatag_extended_perms gets created twice, once inside a folder named b HOT 5
- The patch is partially applied HOT 3
- [2.0.0-beta1] No available patcher was able to apply patch ( for drupal/core ) HOT 7
- Composer require hangs sometimes when a patch applies HOT 2
- Removing package for re-install and re-patch does not trigger if patches definition is empty (1.7.3) HOT 1
- I'm Confused By Some of the Directions HOT 5
- [2.*] Make lock file path configurable HOT 2
- Write copy of a patch to a project directory for code review HOT 6
- Link in the README 404s: Documentation: https://docs.cweagans.net/composer-patches HOT 2
- Add a `patches-import` subcommand as a way to support discovering patches from dependencies HOT 4
- Dependency patch resolution: use patches file from dependency instead of root composer if configured HOT 1
- Dependency patch resolution: resolve file paths to local patches stored in dependencies HOT 5
- Mention my d10up article
- Dependency patch resolution: Only allow patches from trusted dependencies HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer-patches.