我想为我的项目安装补丁
像这样的补丁
Index: vendor/magento/framework/DB/Adapter/Pdo/Mysql.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- vendor/magento/framework/DB/Adapter/Pdo/Mysql.php (revision 6a8701ca9402697f5eaf022e35b9217d3281546c)
+++ vendor/magento/framework/DB/Adapter/Pdo/Mysql.php (date 1553502112000)
@@ -2904,7 +2904,7 @@
if (isset($condition['to'])) {
$query .= empty($query) ? '' : ' AND ';
$to = $this->_prepareSqlDateCondition($condition, 'to');
- $query = $this->_prepareQuotedSqlCondition($query . $conditionKeyMap['to'], $to, $fieldName);
+ $query = $query . $this->_prepareQuotedSqlCondition($conditionKeyMap['to'], $to, $fieldName);
}
} elseif (array_key_exists($key, $conditionKeyMap)) {
$value = $condition[$key];
我还添加了作曲家:
"extra": {
"magento-force": "override",
"patches": {
"magento/framework": {
"Fix: PRODSECBUG-2198":
"patches/composer/magento/framework/PRODSECBUG2198.patch"
}
}
}
当我尝试运行composer install时,返回以下错误: 无法应用补丁!正在跳过。错误是:无法应用修补程序patch / composer / magento / framework / PRODSECBUG2198.patch
Magento 2.2.7的项目,我安装了cweagans / composer-patches,但仍然有问题。有人可以帮忙吗?
答案 0 :(得分:0)
我对补丁程序包没有太多的经验,但是在我们的一个项目中,我们也使用它。在补丁文件中,要打包的文件的位置是相对于软件包根目录给出的。因此,如果您想修补magento/framework
中的某些内容,则修补文件可能应该使用DB/Adapter/Pdo/Mysql.php
作为文件名