I'm using Composer for a project that needs to handle some dependencies but I got a really weird issue. Composer is ignoring the composer.json file contained in child packages.
My project needs to retrieve some custom zip packages, in these packages a composer.json file defines other requirements. The repositories of these requirements are declared in the root composer.json file since Composer cant recursively fetch repositories.
The thing is that after my zip package is downloaded, unpacked and placed in the vendor dir, composer totally ignores its composer.json where other requirements are defined...
The zip archive is something like this:
- /dir1
- /dir2
- file1
- file2
- composer.json
To give you an idea this is how my root composer.json looks like:
{
"name": "myproject/project",
"type": "library",
"repositories": [
{
"packagist" : false
},
{
"type": "package",
"package": {
"name" : "giulianobundles/mybundle",
"version" : "1",
"dist": {
"url": "http://url/to/zip/file",
"type": "zip"
}
}
},
{
"type": "package",
"package": {
"name" : "giulianobundles/mybundlerequirement",
"version" : "1",
"dist": {
"url": "http://url/to/zip/file",
"type": "zip"
},
}
},
],
"require": {
"php": ">=5.3.2",
"giulianobundles/mybundle": "*"
},
"autoload": {
"psr-0": {
"config": "./"
}
},
}
and the bundle's composer.json package looks like
{
"name": "giulianobundles/mybundle",
"type":"library",
"require": {
"giulianobundles/mybundlerequirement": "1"
}
}
Mybundle package get succesfully installed but its composer.json file is totally ignored. Any idea? What am I missing?