Q:

PHP & Composer, how do I combine composer.json files

Can someone explain how I'm supposed to use composer with a php. I have a composer.json file in my doc root that downloads the core packages for my project, but then when I want to add another project like google+ php sdk found here https://github.com/googleplus/gplus-quickstart-php/
what do I do with that composer.json file? do i combine them manually? Do I just download that composer.json into a different dir?
my current composer.json file looks like this
 {
"name": "fuel/fuel",
"type": "metapackage",
"description": "The FuelPHP framework",
"keywords": ["framework"],
"homepage": "http://fuelphp.com",
"license": "MIT",
"authors": [
    {
        "name": "FuelPHP Development Team",
        "email": "team@fuelphp.com"
    }
],
"support": {
    "irc": "irc://irc.freenode.org/fuelphp",
    "forum": "http://fuelphp.com/forums"
},
"require": {
    "php": ">=5.3.3",
    "monolog/monolog": "1.5.*",
    "fuelphp/upload": "2.0",
    "omissis/php-cloudfiles": "dev-master",
    "mustache/mustache": "*"
},
"suggest": {
    "mustache/mustache": "Allow Mustache templating with the Parser package",
    "smarty/smarty": "Allow Smarty templating with the Parser package",
    "twig/twig": "Allow Twig templating with the Parser package",
    "mthaml/mthaml": "Allow Haml templating with Twig supports with the Parser package"
},
"config": {
    "vendor-dir": "fuel/vendor"
},
"minimum-stability": "dev"
}

The g+ composer.json file looks like
 {
"name": "googleplus/quickstart",
"description": "This quick-start app is built in PHP and lets you get started with the Google+ platform in a few minutes.",
"license": "Apache-2.0",
"repositories": [
    {
        "type": "package",
        "package": {
            "name": "google/google-api-php-client",
            "version": "0.6.2",
            "dist": {
                "url": "http://google-api-php-client.googlecode.com/files/google-api-php-client-0.6.2.tar.gz",
                "type": "tar"
            },
            "autoload": {
                "classmap": [
                    "src/"
                ]
            }
        }
    }
],
"require": {
    "silex/silex": "1.0.*@dev",
    "twig/twig": ">=1.8,<2.0-dev",
    "google/google-api-php-client": "0.6.2"
}
}

A:

Simply add this into the require block of your original composer file:
"googleplus/quickstart": "*",

