2017 © Pedro Peláez
 

composer-plugin composer-patcher

Runs patches against projects after install

image

jpstacey/composer-patcher

Runs patches against projects after install

  • Saturday, June 13, 2015
  • by jpstacey
  • Repository
  • 3 Watchers
  • 7 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

composer-patcher

The project jpstacey/composer-patcher is now deprecated in favour of netresearch/composer-patches-plugin., (*1)

Please update your composer.json files accordingly., (*2)

Old documentation, for reference

Plugin to patch composer downloads post-hoc., (*3)

Arguably you wouldn't want to do this, if you could avoid it. But it's the way that a lot of existing drupal.org patch workflow happens (especially via Drush make) and so this provides a useful transition technology., (*4)

Minimum composer.json

The package is now registered on Packagist:, (*5)

https://packagist.org/packages/jpstacey/composer-patcher, (*6)

so you should only require the following minimum JSON:, (*7)

{
    "require": {
        "jpstacey/composer-patcher": "*"
    },
    "scripts": {
        "post-package-install": "Composer\\Patcher\\PatcherPlugin::postPackageInstall"
    }
}

The "scripts" is required in your root composer.json as it will not run in a subsidiary composer.json for security reasons., (*8)

Example composer.json

Downloads and patches a Drupal module:, (*9)

{
    "repositories": {
        "xmlsitemap": {
            "type": "package",
            "package": {
                "name": "drupal/xmlsitemap",
                "type": "drupal-module",
                "version": "2.0-rc2",
                "dist": {
                    "url": "http://ftp.drupal.org/files/projects/xmlsitemap-7.x-2.0-rc2.tar.gz",
                    "type": "tar"
                },
                "extra": {
                    "patch": [
                        "https://drupal.org/files/include_inc_file-1392710.patch"
                    ]
                }
            }
        }
    },
    "require": {
        "jpstacey/composer-patcher": "*",
        "drupal/xmlsitemap": "2.0-rc2"
    },
    "scripts": {
        "post-package-install": "Composer\\Patcher\\PatcherPlugin::postPackageInstall"
    }
}

The Versions

13/06 2015

dev-master

9999999-dev

Runs patches against projects after install

  Sources   Download

The Requires

  • php >=5.3.0
  • composer-plugin-api 1.0.0

 

by J-P Stacey

26/08 2014

dev-develop

dev-develop

Runs patches against projects after install

  Sources   Download

The Requires

  • composer-plugin-api *
  • php >=5.3.0

 

by J-P Stacey

26/08 2014

1.1.0

1.1.0.0

Runs patches against projects after install

  Sources   Download

The Requires

  • composer-plugin-api *
  • php >=5.3.0

 

by J-P Stacey

20/08 2014

1.0.0

1.0.0.0

Runs patches against projects after install

  Sources   Download

The Requires

  • composer-plugin-api *
  • php >=5.3.0

 

by J-P Stacey