What is patch level in git and composer?
abhai
20 October 2023
You might have seen the command "patch -p2" or an entry in composer.json when using cweagans/composer-patches like the following.
"patchLevel": {
"drupal/core": "-p2"
}
In the command "patch -p2," the "-p2" flag specifies the patch level.
The "patch" command is used to apply changes, or patches, to source code files. The "-p" flag followed by a number tells the patch command how many directory levels to strip from the file paths mentioned in the patch file.
How to download an external library in your composer project?
abhai
23 April 2022
Sometimes you might need to download and use a library that is not provided by any composer providers in your Drupal, Symfony or other composer managed PHP project. But this doesn't mean you'll have to resort to downloading and committing the whole folder.