2017 © Pedro Peláez
 

composer-plugin composer-patches

Provides a way to patch Composer packages.

image

burdamagazinorg/composer-patches

Provides a way to patch Composer packages.

  • Thursday, June 9, 2016
  • by dbosen
  • Repository
  • 3 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 134 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

composer-patches

Simple patches plugin for Composer. Applies a patch from a local or remote file to any package required with composer., (*1)

Usage

Example composer.json:, (*2)

{
  "require": {
    "cweagans/composer-patches": "~1.0",
    "drupal/drupal": "8.0.*@dev"
  },
  "config": {
    "preferred-install": "source"
  },
  "extra": {
    "patches": {
      "drupal/drupal": {
        "Add startup configuration for PHP server": "https://www.drupal.org/files/issues/add_a_startup-1543858-30.patch"
      }
    }
  }
}

Using an external patch file

Instead of a patches key in your root composer.json, use a patches-file key., (*3)

{
  "require": {
    "cweagans/composer-patches": "~1.0",
    "drupal/drupal": "8.0.*@dev"
  },
  "config": {
    "preferred-install": "source"
  },
  "extra": {
    "patches-file": "local/path/to/your/composer.patches.json"
  }
}

Then your composer.patches.json should look like this:, (*4)

{
  "patches": {
    "vendor/project": {
      "Patch title": "http://example.com/url/to/patch.patch"
    }
  }
}

Difference between this and netresearch/composer-patches-plugin

  • This plugin is much more simple to use and maintain
  • This plugin doesn't require you to specify which package version you're patching
  • This plugin is easy to use with Drupal modules (which don't use semantic versioning).
  • This plugin will gather patches from all dependencies and apply them as if they were in the root composer.json

Credits

A ton of this code is adapted or taken straight from https://github.com/jpstacey/composer-patcher, which is abandoned in favor of https://github.com/netresearch/composer-patches-plugin, which is (IMHO) overly complex and difficult to use., (*5)

The Versions

09/06 2016

dev-master

9999999-dev

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.3.0
  • composer-plugin-api ^1.0

 

The Development Requires

by Christian Fritsch

28/03 2016

1.5.0

1.5.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.3.0
  • composer-plugin-api ^1.0

 

The Development Requires

29/02 2016

1.4.0

1.4.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.3.0
  • composer-plugin-api ~1.0

 

The Development Requires

09/07 2015

1.3.0

1.3.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.4.0
  • composer-plugin-api ~1.0

 

The Development Requires

16/05 2015

1.2.0

1.2.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.4.0
  • composer-plugin-api ~1.0

 

The Development Requires

27/04 2015

1.1.0

1.1.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.4.0
  • composer-plugin-api ~1.0

 

The Development Requires

23/04 2015

1.0.0

1.0.0.0

Provides a way to patch Composer packages.

  Sources   Download

BSD

The Requires

  • php >=5.4.0
  • composer-plugin-api ~1.0

 

The Development Requires