All Projects → netresearch → composer-patches-plugin

netresearch / composer-patches-plugin

Licence: AGPL-3.0 license
Plugin for composer to apply patches onto dependencies.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to composer-patches-plugin

Composer Dropin Installer
Use composer for installing dropin dependencies
Stars: ✭ 30 (-60%)
Mutual labels:  composer, composer-plugin
composer-repl
A REPL for PHP built into Composer (using PsySH)
Stars: ✭ 81 (+8%)
Mutual labels:  composer, composer-plugin
Composer Notifier
💬 Display desktop notification after Composer install / update
Stars: ✭ 42 (-44%)
Mutual labels:  composer, composer-plugin
Composer Normalize
🎵 Provides a composer plugin for normalizing composer.json.
Stars: ✭ 602 (+702.67%)
Mutual labels:  composer, composer-plugin
Private Composer Installer
Composer install helper outsourcing sensitive keys from the package URL into environment variables
Stars: ✭ 168 (+124%)
Mutual labels:  composer, composer-plugin
Composer Merge Plugin
Merge one or more additional composer.json files at Composer runtime
Stars: ✭ 718 (+857.33%)
Mutual labels:  composer, composer-plugin
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (+25.33%)
Mutual labels:  composer, composer-plugin
composer-inheritance-plugin
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.
Stars: ✭ 20 (-73.33%)
Mutual labels:  composer, composer-plugin
Foxy
A fast, reliable, and secure NPM/Yarn bridge for Composer
Stars: ✭ 137 (+82.67%)
Mutual labels:  composer, composer-plugin
Composer Custom Directory Installer
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.
Stars: ✭ 117 (+56%)
Mutual labels:  composer, composer-plugin
Composer Changelogs
📓 Display better summary after Composer update
Stars: ✭ 540 (+620%)
Mutual labels:  composer, composer-plugin
Composer Patches
Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and composer command for testing/troubleshooting patches.
Stars: ✭ 196 (+161.33%)
Mutual labels:  composer, composer-plugin
Composer Registry Manager
🛠 🔨 Composer registry manager that help to easily switch to the composer repository you want.
Stars: ✭ 448 (+497.33%)
Mutual labels:  composer, composer-plugin
Awesome Composer
😎 A curated awesome list for Composer, Packagist, Satis, Plugins, Scripts, Composer related resources, tutorials.
Stars: ✭ 738 (+884%)
Mutual labels:  composer, composer-plugin
Acf Pro Installer
A composer install helper for Advanced Custom Fields PRO
Stars: ✭ 265 (+253.33%)
Mutual labels:  composer, composer-plugin
Skrub
A package to remove junk from Composer installations and trim build sizes.
Stars: ✭ 91 (+21.33%)
Mutual labels:  composer, composer-plugin
cyclonedx-php-composer
Create CycloneDX Software Bill of Materials (SBOM) from PHP Composer projects
Stars: ✭ 20 (-73.33%)
Mutual labels:  composer, composer-plugin
wp-translation-downloader
Composer plugin to download WordPress translations
Stars: ✭ 35 (-53.33%)
Mutual labels:  composer, composer-plugin
Composer Cleaner
Victor The Cleaner: removes unnecessary files from vendor directory
Stars: ✭ 114 (+52%)
Mutual labels:  composer, composer-plugin
Composer Preload
Preload your sweet sweet code to opcache with a composer command, making your code faster to run.
Stars: ✭ 173 (+130.67%)
Mutual labels:  composer, composer-plugin

composer-patches-plugin

This plugin allows you to provide patches for any package from any package.

If you don't want a patch package outside the root package, consider providing it as package in the repositories key

{
    "name": "vendor/package",
    "type": "project",
    "repositories": [
        {
            "type": "package",
            "package": {
                "type": "metapackage",
                "name": "vendor/package-patches",
                "version": "1.0.0",
                "require": {
                    "netresearch/composer-patches-plugin": "~1.0"
                },
                "extra": {
                    "patches": {
                        "vendor/name": [
                            {
                                "url": "https://my-domain.com/path/to/my.patch"
                            }
                        ]
                    }
                }
            }
        }
    ],
    "require": {
        "vendor/package-patches": "~1.0"
    }
}

See this presentation for the original idea of this plugin: http://de.slideshare.net/christianopitz/distributed-patching-with-composer

Patch properties

Key Description Required
url The url or path to the patch
title Title to display when applying or reverting the patch
args string, which will be added to the patch command
sha1 SHA1 checksum of the patch contents for security check - when given the patches actual checksum and this value are compared and if they don't match an exception will be thrown

You may provide patches per package and optionally by version constraints:

Provide patches by package only

{
    "name": "netresearch/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "netresearch/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms": [
                {
                    "title": "[FEATURE] Allow registration of different login forms",
                    "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
                },
                {
                    "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                    "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                }
            ]
        }
    }
}

Provide patches by package and versions or version constraints


composer.json:

{
    "name": "netresearch/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "netresearch/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms":     {
                "6.2.0-beta1": [
                    {
                        "title": "[FEATURE] Allow registration of different login forms",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
                    },
                    {
                        "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                    }
                ],
                "6.2.0-beta2": [
                    {
                        "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
                    }
                ],
                "6.2.*": [
                    {
                        "title": "[BUGFIX] Ignore dependencies on non typo3-cms-extension",
                        "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/9fe856ac96e6a53fef8277f36a4a80bace6f0ae9",
                        "sha1": "b56a1c47a67d1596c0bd8270e61c44f8911af425"
                    }
                ]
            }
        }
    }
}

Note: When multiple version constraints match the version of the target package, all of the matching patches will be applied (canonicalized by theyr checksums, so no duplicates should occure).

Provide patches from URLs or paths

You can put any part of the patches object into another JSON and load it via an URL (or a path):

composer.json:

{
    "name": "netresearch/typo3-patches",
    "version": "1.0.0",
    "type": "metapackage",
    "require": {
        "netresearch/composer-patches-plugin": "~1.0"
    },
    "extra": {
        "patches": {
            "typo3/cms": "http://example.com/typo3-patches.json"
        }
    }
}

http://example.com/typo3-patches.json

{
    "6.2.0-beta1": [
        {
            "title": "[FEATURE] Allow registration of different login forms",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
        },
        {
            "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
        }
    ],
    "6.2.0-beta2": [
        {
            "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
        }
    ],
    "6.2.*": [
        {
            "title": "[BUGFIX] Ignore dependencies on non typo3-cms-extension",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/9fe856ac96e6a53fef8277f36a4a80bace6f0ae9",
            "sha1": "b56a1c47a67d1596c0bd8270e61c44f8911af425"
        }
    ]
}

Requiring the patches:

just require the package with the patches.

{
    "name": "netresearch/patched-typo3",
    "type": "project",
    "description": "A patched version of typo3",
    "minimum-stability": "dev",
    "require": {
        "netresearch/typo3-patches": "~1.0",
        "typo3/cms": "6.2.0-beta3"
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].