• First make sure that this package is installed via composer: cweagans/composer-patches
    • Lets say you want to apply a patch from a third-party module installed via composer for a controller. Please make sure that you have this part in the composer.json file:
    "extra": {
        "magento-force": true,
        "composer-exit-on-patch-failure": true,
        "patches": {
            "vendorname/module-somerandomname": {
                "Description here": "patches/my_patch_name.patch"
            }
        }
    },
    • Assuming that your vendor folder is in the .gitignore file, you can still do:
    1. git add -f vendor/vendorname/module-somerandomname/Controller/Myfile.php
    2. Do your changes to the Myfile.php
    3. Do a git diff vendor/vendorname/module-somerandomname/Controller/Myfile.php > patches/my_patch_name.patch
    4. git reset HEAD vendor/vendorname/module-somerandomname/Controller/Myfile.php
    5. Do a composer install
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment