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

composer: How to find the exact version of a package?

I know it’s an old question, but… composer.phar show Will show all the currently installed packages and their version information. (This was shown in previous versions of Composer only when using the now-deprecated -i option.) To see more details, specify the name of the package as well: composer.phar show monolog/monolog That will show many things, … Read more

Composer require local package

The way to link to a local, in-development package is to first add in your main project’s composer.json a repository, like this: “repositories”: [ { “type”: “path”, “url”: “/full/or/relative/path/to/development/package” } ] You also need to either have a version specified in your development package’s composer.json or the way I do it is to require the … Read more