fhaase/composer-patches-generate

Command to create composer patches via cli

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/fhaase/composer-patches-generate

v0.1.0 2025-10-10 20:10 UTC

This package is auto-updated.

Last update: 2025-11-10 20:18:50 UTC


README

Generate .patch files with a single command.

Install

Make sure git and find are installed.

git version           
-> git version 1.51.0

find --version
-> find (GNU findutils) 4.10.0-dirty
composer require --dev fhaase/composer-patches-command

# Recommended to apply patches on install
composer require cweagans/composer-patches

Usage

Generate or update patch files

  1. Create a copy of a file with *.old suffix inside one of the composer packages
  2. Modify the original file
    There should now be files like this:
    UserFactory.php
    UserFactory.php.old
    
  3. Run the command with the package name
    vendor/bin/composer-patches-generate vendor/example
  4. When prompted, you can give a short description to generate configuration for cweagans/composer-patches \
    {
       "extra": {
           "patches": {
               "vendor/example": {
                   "description": "patches/vendor_example/UserFactory.patch"
               }
           }
       }
    }