FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
322 stars 140 forks source link

Composer Dependency of "facebook/php-sdk" #222

Closed wush978 closed 11 years ago

wush978 commented 11 years ago

Hi, I tried to install FriendsOfSymfony/FOSFacebookBundle today.

At first, I followed the installation tips in README.md and met a dependency issue of composer as follow at first:

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for friendsofsymfony/facebook-bundle dev-master -> satisfiable by friendsofsymfony/facebook-bundle dev-master.
    - friendsofsymfony/facebook-bundle dev-master requires facebook/php-sdk dev-master -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

I also noticed that facebook/php-sdk has been deprecated, so the installation tips in README.md is invalid now.

I found a possible solution tentatively:

Add the following lines to composer.json:

{
    "require": {
        "friendsofsymfony/facebook-bundle": "dev-master"
    },
    "name": "facebook/php-sdk",
    "description": "Facebook PHP SDK",
    "keywords": ["facebook", "sdk"],
    "type": "library",
    "homepage": "https://github.com/facebook/facebook-php-sdk",
    "license": "Apache2",
    "authors": [
        {
            "name": "Facebook",
            "homepage": "https://github.com/facebook/facebook-php-sdk/contributors"
        }
    ],
    "require": {
        "php": ">=5.2.0",
        "ext-curl": "*",
        "ext-json": "*"
    },
    "autoload": {
        "classmap": ["src"]
    }
}

and the bundle will be installed successfully.

diegoholiveira commented 11 years ago

You can fix your composer just as this example:

{

    "require": {
        "friendsofsymfony/facebook-bundle" : "dev-master"
    },
    "minimum-stability": "dev"
}

Notice the option "minimum-stability", this is what is causing this problem. I also fix it on the documentation.