如何使用composer在drupal 8中应用补丁

Sometimes, when we use a contrib module in Drupal, we encounter a bug. Chances are that someone has already fixed it and contributed a patch to the Drupal community.

有时,当我们在Drupal中使用contrib模块时,会遇到一个错误。 很有可能有人已经修复它并为Drupal社区贡献了补丁。

First, let’s assume our site root folder is /var/www/public/drupal_site.

首先,假设我们的站点根文件夹为/ var / www / public / drupal_site

This example will patch the module Scroll to destination anchors (https://www.drupal.org/project/scroll_to_destination_anchors)

此示例将修补模块滚动到目标锚点 ( https://www.drupal.org/project/scroll_to_destination_anchors )

These are the steps to apply a patch to a module using Composer:

这些是使用Composer将补丁应用到模块的步骤:

使用Composer添加模块 (Add the module with Composer)

To download the module to our site, all we have to do is run this command in a terminal while being in the site root folder:

要将模块下载到我们的站点,我们要做的就是在站点根目录中的终端中运行以下命令:

composer require drupal/scroll_to_destination_anchors

作曲家需要drupal / scroll_to_destination_anchors

This command will download the

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值