GithubHelp home page GithubHelp logo

blakethomp / composer-patches-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netresearch/composer-patches-plugin

0.0 1.0 0.0 156 KB

Plugin for composer to apply patches onto dependencies.

PHP 100.00%

composer-patches-plugin's Introduction

composer-patches-plugin

Plugin for composer to apply patches onto dependencies.

Slides: http://de.slideshare.net/christianopitz/distributed-patching-with-composer

Providing patches

You can provide the patches in any package through the extra object (you are free but don't have to bundle your patches in "patches" packages):


composer.json:

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

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": "patches",
    "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": {
        "32f331fead9c7aa50d9248c54e3c0af75d793539": {
            "title": "[FEATURE] Allow registration of different login forms",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/32f331fead9c7aa50d9248c54e3c0af75d793539"
        },
        "a48f8b0dae11ce7246eff43132d986bccf55b786 ": {
            "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": {
        "a48f8b0dae11ce7246eff43132d986bccf55b786 ": {
            "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-beta3": {
        "a48f8b0dae11ce7246eff43132d986bccf55b786 ": {
            "title": "[PATCH] [BUGFIX] Flexform \"required\" on input fields applies to last field only",
            "url": "https://git.typo3.org/Packages/TYPO3.CMS.git/patch/a48f8b0dae11ce7246eff43132d986bccf55b786"
        }
    }
}

Requiring the patches:

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

{
    "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"
    }
}

composer-patches-plugin's People

Contributors

copitz avatar cweiske avatar kasperg avatar

Watchers

 avatar

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.