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?
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.
Comments