doubi7306 2015-03-19 09:32
浏览 101
已采纳

Symfony2项目,Composer没有安装包无法找到任何版本,

Hi there am quite new to the world of composer and i'm having problems installing a package into symfony2

The package in question is: https://github.com/gridiron-guru/FantasyDataAPI

My composer.phar looks like the the following:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.4.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "~3.0",
        "sensio/generator-bundle": "~2.3",
        "incenteev/composer-parameter-handler": "~2.0",
        "gridiron-guru/FantasyDataAPI" : "1.*"
    },
    "repositories": [ {
        "type": "vcs",
        "url": "https://github.com/gridiron-guru/FantasyDataAPI"
    }],
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.4-dev"
        }
    }
}

when i run: php composer.phar update I get the following error.

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package gridiron-guru/fantasydataapi could not be found in any version, there may be a typo in the package
name.

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.

On the Git Repo the only branch is master: with the following tags:

1.0.0, 1.1.0,  1.2.0

I've tried using dev-master, and the different version numbers. but to no avail.

Can i fork the repo and then set my own @stable tag for my fork? How do i reference the new fork?

It could of course be nothing to do with the version, and instead it just cant find the package, although i would think following in my composer.json should address this:

"repositories": [ {
        "type": "vcs",
        "url": "https://github.com/gridiron-guru/FantasyDataAPI"
    }],

I'm guessing i can't just download the src and stick it into my vendors dir, as composer needs to generate the autoload and other gubbins.

Any ideas what i can try to get this package into my project?

  • 写回答

2条回答 默认 最新

  • dongyou8368 2015-03-19 09:45
    关注

    The name of the package is wrong (on the official bundle doc also). In accordion with the composer.json of the library, the correct name is "gridiron-guru/fantasy-data-api"

    So, try substitute this row in the composer.json:

        "gridiron-guru/FantasyDataAPI" : "1.*"
    

    with this:

        "gridiron-guru/fantasy-data-api" : "1.*"
    

    I see you open an issue on the library, can you fix it with an Pull Request for contributing with it?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上