26 votes
Accepted

Should I ignore the "vendor" directory?

There isn't really a right or wrong answer, it will come down to your situation. Composer themselves have pretty strong feelings that yes, you should ignore it, and in an ideal world that's definitely ...
Clive's user avatar
  • 167k
20 votes
Accepted

How to use the Features module in a 3 dev environnement?

Welcome to the land of Features Configuration Management, aka FCM! It is not only about Features, and not about Configuration Management (as introduced in Drupal version 8). Instead, it is a special ...
Pierre.Vriens's user avatar
15 votes

How do I apply a patch with Composer workflow?

First, run composer require cweagans/composer-patches Now you have a package installed that enables you to patch core, libraries or modules. Second, add a patch to a folder named 'patches' in the ...
Stef Van Looveren's user avatar
12 votes
Accepted

`composer require` fails because "Source directory docroot/core has uncommitted changes"

Explanation: The problem is that cweagans/composer-patches is applying patches to Drupal Core after cloning it, leading Composer to believe you've modified the affected files and therefore to prompt ...
TravisCarden's user avatar
10 votes

How do I apply a patch with Composer workflow?

The issue is that composer is applying patches using git apply which is not working for packages that are not installed from source. Therefore the solution is to install the packages from source. ...
Thomas Pappas's user avatar
10 votes

How to tell if my Drupal site is comprised from the SA-CORE-2018-002 -- 2018 March exploit?

How can I tell if someone used this exploit to hack my site? Your Drupal 7 or 8 site can experience loss or theft of data, data can be removed, deleted or changed, wreaking havoc on the site in many ...
Christia's user avatar
  • 1,647
9 votes

How do I apply a patch with Composer workflow?

To apply a patch in drupal 8, edit the composer.json file and find the extra section - "extra": { . . . "patches": { "drupal/MODULE_NAME": { "...
Wasim Khan's user avatar
8 votes
Accepted

What is the purpose of key_value_expire table?

Beside the form cache and the update status the key_value_expire table is mainly used by the private and shared temp store. There you find a good explanation what the purpose of this data is: class ...
4uk4's user avatar
  • 99.6k
8 votes
Accepted

How to tell if my Drupal site is comprised from the SA-CORE-2018-002 -- 2018 March exploit?

What could happen I had a personal Drupal site hacked during Drupalgeddon, an exploit of similar severity (though of a different type). In terms of "what could happen," in that case the hacker put ...
Mike Nolan's user avatar
7 votes
Accepted

How to update my module's dev branch on Drupal.org

No need to deal with tags for the dev branch. Tags are only required for stable releases. Since you have already added your dev branch you just have to add your files, commit them and push them, like ...
rooby's user avatar
  • 14.7k
7 votes

How to use the Features module in a 3 dev environnement?

Merge conflicts are probably going to be a given when multiple developers are integrating their configuration into a Feature. I wrote up several guidelines for reviewing feature code, but I think the ...
mradcliffe's user avatar
  • 5,917
7 votes
Accepted

[user-name]@git.drupal.org: Permission denied (publickey)

Cloning a project as maintainer of that project is done using the following command. git clone [email protected]:project/a_project.git The username is always git. As non-maintainer, the command to ...
apaderno's user avatar
  • 97.4k
6 votes
Accepted

I'm trying to release a contrib module, but only see the dev version

I just cloned the repo but there is not an 8.x-1.0 tag. You have to push the tag with git push origin 8.x-1.0. Then you can create the 8.x-1.0 release.
cilefen's user avatar
  • 5,967
5 votes

How do I use a settings.local.php file?

When installing Drupal, you need to copy the example.settings.php file in settings.php. After Drupal is installed, you need to include the following code in the settings.php file. if (file_exists(...
StevanRS's user avatar
  • 311
5 votes

Should I ignore the "vendor" directory?

Drupal core and modules update so frequently, often with security fixes, that it has become common to use composer to manage dependencies. Composer will place dependencies in the vendor directory, ...
oknate's user avatar
  • 14.3k
5 votes
Accepted

How to install a specifc commit in Composer

composer require drupal/commerce_webform_order:dev-1.x#30668342035ae3add3a2e5163e84816fc96edd92 dev-1.x points to a git branch so it accepts the commit ref 1.x-dev is dev release at drupal.org and it ...
mikran's user avatar
  • 66
4 votes
Accepted

Which files should I version?

Drupal comes with an example .gitignore file, just rename "example.gitignore" to .gitignore and you have a pretty good starting point. It also comes with a lot of explanations. Many of your questions ...
Berdir's user avatar
  • 83.2k
4 votes

How to manage patches in composer when they're merged into the module?

Run your deploy build locally and if a patch fails during composer up and you see that it has already been integrated into the module, then delete the patch from composer.json.
oknate's user avatar
  • 14.3k
4 votes

.gitignore file setup for Acquia Cloud

Acquia Cloud provides you with a default .gitignore in your repository (as described here): docroot/files docroot/sites/*/files docroot/sites/*/private acquia-files It usually is enough for the vast ...
anavarre's user avatar
  • 611
4 votes
Accepted

How do I use Git when using Composer?

Short answer: no, you do not need to commit the vendor folder, because the contents are built using composer.lock and composer.json (both should be committed) when running composer install. Some ...
Kevin's user avatar
  • 27.8k
4 votes

Patching .htaccess file

For drupal 8, use the following. In the 'scripts' section of your composer.json, add "post-drupal-scaffold-cmd": [ "patch -p0 < patches/htaccess.patch" ]
Stef Van Looveren's user avatar
4 votes
Accepted

How to properly perform a patch so that the correct directory is used?

The command git diff always creates a diff (patch) for the current repository you are working with. If you want to create a patch for a certain module, but get a diff with full paths including your ...
Mario Steinitz's user avatar
4 votes

How to properly perform a patch so that the correct directory is used?

Actually, there is a fairly easy way to generate a patch for a certain path with --relative. So in your case, just run git diff --relative=docroot/modules/contrib/video_embed_vidyard.
Berdir's user avatar
  • 83.2k
4 votes
Accepted

How do I create a merge request for a project?

As said in Issue forks & merge requests drupal.org only implements (so far) issue forks and merge requests related to those issue forks. Issue forks are still in development and enabled only on ...
apaderno's user avatar
  • 97.4k
4 votes
Accepted

Is there a way to sync file naming across environments?

Do not use node ID based templates at all in such scenarios. Instead create your own custom theme suggestions based on a logic that does not change between environments: function ...
Hudri's user avatar
  • 5,500
3 votes

Development with git branches/ gitflow and new modules

I always have a somewhat up-to-date DB dump from live/master available. When switching between feature branches I can drush sql-drop the DB, drush sql-cli < live.sql and drush cim the branch config....
leymannx's user avatar
  • 18.1k
3 votes

Remove and uninstall module in a single patch

You can use ModuleInstaller::uninstall(): \Drupal::service('module_installer')->uninstall(['social_stats_views']); In D8 there is a lot of housekeeping to do. You can see this in the code of ...
4uk4's user avatar
  • 99.6k
3 votes

Using Git with a Drupal site

Yes. It is typical practice to manage Drupal with a VCS, with Git being the defacto option; Drupal core, as well as all projects on drupal.org, uses Git as its VCS. Drupal includes some default git ...
Shawn Conn's user avatar
  • 26.9k
3 votes

Using Git with a Drupal site

Git is a source code management (SCM) system. There are many different source code management systems out there and Git fall into the category of a distributed version control system (DVCS). It ...
parth.k's user avatar
  • 1,014
3 votes

Applying a patch that involve multiple modules

Drush make is a method to maintain patched releases of contrib and core. It is the only organized, non-custom, method I know of for patch management. The makefile is self-documenting. By "self-...
cilefen's user avatar
  • 5,967

Only top scored, non community-wiki answers of a minimum length are eligible