How to add non-public repositories from command line with composer?

You can run the following from the project root to add a repository to the project’s composer.json: composer config repositories.repo-name vcs https://github.com/<orgname or username>/repo Then you can require the specific repo with: composer require <orgname or username>/repo:dev-branchname The Composer documentation covers it at Modifying Repositories (CLI: composer config).

Cannot update yii2 via composer bower-asset/jquery could not be found

Finally fixed it, just followed the steps on the UPGRADE.md doc If you are using Composer to upgrade Yii, you should run the following command first (once for all) to install the composer-asset-plugin: composer global require “fxp/composer-asset-plugin:^1.2.0” (See http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-from-composer for latest version.) You may also need to add the following code to your project’s composer.json … Read more

Composer [UnexpectedValueException] error will trying to use composer to install a github project

I started getting a similar error and the reason was that Github recently changed the format of their auth tokens: Authentication token format updates are generally available To resolve the error: Find the composer/auth.json file (if you’re running the project in a container, you’ll have to bash into it and find the file in there) … Read more

Remove composer

During the installation you got a message Composer successfully installed to: … this indicates where Composer was installed. But you might also search for the file composer.phar on your system. Then simply: Delete the file composer.phar. Delete the Cache Folder: Linux: /home/<user>/.composer Windows: C:\Users\<username>\AppData\Roaming\Composer That’s it.

What is the difference between require and require-dev sections in composer.json?

Different Environments Typically, software will run in different environments: development testing staging production Different Dependencies in Different Environments The dependencies which are declared in the require section of composer.json are typically dependencies which are required for running an application or a package in staging production environments, whereas the dependencies declared in the require-dev section are … Read more