PMC Composer
Use this library to manage all composer packages.
Steps to add new composer package
- Update and add new package in
composer.json - Run
composer install - Run git add command with force option -
git add -f ./vendor - Create PR and get feedback from devs
- If the package has over 1000 lines of code (it usually is), follow the guideline mentioned in https://confluence.pmcdev.io/display/ENG/Deploying+to+WPCOM+VIP (opens in a new tab) (see the section for
Large Deploy Process
List of packages installed in pmc-composer
- rollbar/rollbar - used for subscription stack (opens in a new tab) to log user's login (see pmc-subscriptions-v2).
- opis/json-schema - used by Nova to validate component data against corresponding schemas.
Important Note on composer update and composer require
Please note that the following file and code in monolog package are manually updated, that's because VIP doesn't allow us to use the original code that executes mkdir. If you ever need to run composer update or composer require, then its function gets overwritten, please restore the code as below in this function.
File: vendor/monolog/src/Monolog/Handler/StreamHander.php
Code to restore:
private function createDir()
{
throw new \Exception('createDir is not allowed');
}