Composer dowloading not specified packages

Cláudio Ribeiro

I'm giving my first steps into composer and when trying it on my xammp installation I get a curious result. Here's my composer.json file:

{
"name"              : "...",
"description"       : "...",
"keywords"          : ["library", "php"],
"minimum-stability" : "dev",
"license"           : "MIT",
"type"              : "library",
"require"           :
{
    "php": ">=5.4"
},
"require-dev":
{
    "phpunit/phpunit" : "4.5.*"
},
"authors"           :
[
    {
        "name"     : "....",
        "email"    : "...."
    }
],
"autoload"          :
{
    "psr-4" : { "MyCode\\" : "src/" }
},
"config"            :
{
    "vendor-dir" : "packages"
}

}

With this I guessed that it would only install the phpunit package, but after running 'composer install' I saw a lot of downloading and ended up with a packages folder containing the following packages: - composer - doctrine - phpdocumentor - phpsec - phpunit - sebastian - symfony ( which only has the yaml package inside ) and finally the autoload.php file.

Why does this happen?

user3942918

It pulls in the dependencies of your dependencies, and so on recursively. It would be useless to give you phpunit without also giving you the things phpunit needs in order to function.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Composer dowloading not specified packages

From Dev

Adding multiple Composer packages

From Dev

Where are composer packages installed?

From Dev

Composer, Laravel and local packages

From Dev

Installing multiple packages with composer?

From Dev

Where are composer packages installed?

From Dev

Composer local packages

From Dev

Travis configuration for composer packages

From Dev

Composer specifying 'in development' packages?

From Dev

Proper directory structure for composer packages that require other composer packages?

From Dev

Composer not downloading src directory for packages

From Dev

Excluding files from composer packages

From Dev

Different Composer packages with same namespace

From Dev

reload all packages using composer

From Dev

Composer - how to track changes to packages

From Dev

using composer packages in a wordpress plugin

From Dev

Composer require failed to install packages

From Dev

Composer doesn't autoload packages

From Dev

Laravel 4 Composer not installing Packages

From Dev

How to remove packages not installed with Composer?

From Dev

Composer dependency for specified PHP version

From Dev

Can capabilities be specified in Debian packages?

From Dev

Dowloading Image using URL

From Dev

Private composer packages - no valid composer.json was found

From Java

How do I install Composer PHP packages without Composer?

From Dev

How to develop PHP packages in a team using composer?

From Dev

Where to find composer's global packages?

From Dev

Composer packages for functions. Bad form?

From Dev

Why did composer downgrade my packages?