I've got the following composer.json
file:
{
"require": {
"local/my_package": "dev-master"
},
"repositories": [
{
"packagist.org": false
},
{
"type": "path",
"url": "my_package/"
}
]
}
which requires my local package which defines the following my_package/composer.json
file:
{
"name": "local/my_package",
"require-dev": {
"symfony/console": "*"
}
}
Note: The my_package
folder is under Git repository with the default master
branch.
Note: To create new repo, run: git init && git add -A && git commit -am'Files'
.
When I run: composer install -vvv
, the local/my_package
package is installed correctly, but nothing else. I would expect that dependencies defined in symfony/console
should be installed as well.
Executing command (my_package/): git log -n1 --pretty=%H
- Installing local/my_package (dev-master)
How should I correct my composer.json
file, so the package's dependencies can be installed automatically?
It seems the require-dev
keyword in the package's composer.json
file should be changed to require
.
The require-dev
property is only required for developing the package ( root package ).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.