Composer commands


Installing composer packages behind proxy

Dont try to install composer packages with sudo.

export HTTPS_PROXY_REQUEST_FULLURI=false

Other commands:
1. use 
 composer prohibits package-name
to find out the dependency issue with installing that package

2. use
composer info package-name
to find out what other libraries that package requires



If http request failing then force using https.
> composer config -g repo.packagist composer https://packagist.org


Install dev modules.
Example:
local:
composer require --dev 'drupal/devel:^4.0'

prod: 
composer install --no-dev

Install new modules:

https://stackoverflow.com/questions/15212381/composer-how-can-i-install-another-dependency-without-updating-old-ones

Composer cheatsheet
https://devhints.io/composer

In docker composer If you cant run composer
https://stackoverflow.com/questions/28721699/root-password-inside-a-docker-container

Comments

Popular posts from this blog

Programatically create layout builder section in Drupal

Code quality analysis of Drupal. Can I use Sonar?

Set up Drupal7 to Drupal8 migration in simple steps (using Drush)