pixie-media / patching
为 Magento 2 提供关键修复
1.0.4
2024-07-01 16:43 UTC
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- composer/composer: ^1.4 || ^2.0
- composer/semver: @stable
- magento/quality-patches: ^1.1.0
- monolog/monolog: ^1.25||^2.3
- symfony/config: ^3.3||^4.4||^5.0||^6.0
- symfony/console: ^2.6||^4.0||^5.0||^6.0
- symfony/dependency-injection: ^3.3||^4.3||^5.0||^6.0
- symfony/process: ^2.1||^4.1||^5.0||^6.0
- symfony/proxy-manager-bridge: ^3.3||^4.3||^5.0||^6.0
- symfony/yaml: ^3.3||^4.0||^5.0||^6.0
Requires (Dev)
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.2
- codeception/module-db: ^1.0
- codeception/module-phpbrowser: ^1.0
- codeception/module-rest: ^1.2
- consolidation/robo: ^1.2 || ^2.0
- phpmd/phpmd: @stable
- phpunit/phpunit: ^8.5 || ^9.5
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-10-01 00:23:04 UTC
README
安装方法
composer require pixie-media/patching
应用方法
./vendor/pixie-media/patching/bin/ece-patches apply
通用补丁
在本仓库中
./patches
将补丁添加到本仓库如何更新 patches.json
版本与 composer.lock
中找到的版本相关
格式
Correct format: <TICKET_NUMBER>__<TITLE>__<PACKAGE_VERSION>.patch
Example: MAGECLOUD-2899__fix_redis_slave_configuration__2.3.0.patch
示例
PIXIE001__exception__2.4.5.patch
本地补丁
在项目仓库中
./m2-hotfixes
示例补丁
./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();
}
如何创建本地补丁
您想修复 ./vendor/magento/module-catalog/Model/ResourceModel/Product.php
注意:项目必须是 git 仓库
-
下载
/vendor/magento/module-catalog/Model/ResourceModel/Product.php
-
git add -f ./vendor/magento/module-catalog/Model/ResourceModel/Product.php
-
编辑文件
-
git diff ./vendor/magento/module-catalog/Model/ResourceModel/Product.php > ./m2-hotfixes/test.patch
-
将
./m2-hotfixes/test.patch
提交到仓库
注意:您需要撤销更改以测试补丁是否正确应用