Git Product home page Git Product logo

Comments (7)

cweagans avatar cweagans commented on May 29, 2024

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.

yobottehg avatar yobottehg commented on May 29, 2024

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.

cweagans avatar cweagans commented on May 29, 2024

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.

yobottehg avatar yobottehg commented on May 29, 2024

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.

yobottehg avatar yobottehg commented on May 29, 2024

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.

Seldaek avatar Seldaek commented on May 29, 2024

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.

cweagans avatar cweagans commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.