pixie-media/patching

Provides critical fixes for Magento 2

Installs: 60

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-component

1.0.3 2024-03-18 17:36 UTC

This package is auto-updated.

Last update: 2024-04-18 17:45:39 UTC


README

To install

composer require pixie-media/patching

To apply

./vendor/pixie-media/patching/bin/ece-patches apply

Universal patches

In this repo

./patches

What adding patch to this repo update patches.json

Version relates to version found in composer.lock

Format

Correct format: <TICKET_NUMBER>__<TITLE>__<PACKAGE_VERSION>.patch    
Example: MAGECLOUD-2899__fix_redis_slave_configuration__2.3.0.patch

Example

PIXIE001__exception__2.4.5.patch

Local patches

In project repo

./m2-hotfixes

Example patch

./m2-hotfixes/ga-patch.patch
diff --git a/vendor/magento/module-google-gtag/Block/Ga.php b/vendor/magento/module-google-gtag/Block/Ga.php
index ab5824a27..1597db4f8 100644
--- a/vendor/magento/module-google-gtag/Block/Ga.php
+++ b/vendor/magento/module-google-gtag/Block/Ga.php
@@ -159,6 +159,7 @@ class Ga extends Template
                 'value' => number_format((float) $order->getGrandTotal(), 2),
                 'tax' => number_format((float) $order->getTaxAmount(), 2),
                 'shipping' => number_format((float) $order->getShippingAmount(), 2),
+                'currency' => $order->getOrderCurrencyCode(),
             ];
             $result['currency'] = $order->getOrderCurrencyCode();
         }

How to create a local patch

You want to patch ./vendor/magento/module-catalog/Model/ResourceModel/Product.php

Note: project must be a git repo

  • download /vendor/magento/module-catalog/Model/ResourceModel/Product.php

  • git add -f ./vendor/magento/module-catalog/Model/ResourceModel/Product.php

  • Edit file

  • git diff ./vendor/magento/module-catalog/Model/ResourceModel/Product.php > ./m2-hotfixes/test.patch

  • commit ./m2-hotfixes/test.patch to repo

Note: You will need to revert changes to test patch applies correctly

Global patch log

Code Description File name
PIXIE001 2.4.5 No exception log fix PIXIE001__exception__2.4.5.patch
PIXIE002 3DS lookup error 2.4.5p1-p5 PIXIE002__braintree-3ds-lookup-error-fix__2.4.5-p1_p2_p3_p4_p5.patch