Php Symfony2项目,Composer未安装软件包找不到任何版本,
大家好,这是作曲家的新世界,我在symfony2中安装软件包时遇到了问题 有关方案是: 我的composer.phar如下所示:Php Symfony2项目,Composer未安装软件包找不到任何版本,,php,git,symfony,composer-php,Php,Git,Symfony,Composer Php,大家好,这是作曲家的新世界,我在symfony2中安装软件包时遇到了问题 有关方案是: 我的composer.phar如下所示: { "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The \"Symfony Standard Edition\" distribution", "autoload": {
{
"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"
}
}
}
运行时:php composer.phar update
我得到以下错误
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.
我尝试过使用dev master和不同的版本号。
但是没有用
我可以先进行回购,然后为我的回购设置自己的@stable标签吗?
如何引用新的fork
当然,这可能与版本无关,它只是找不到包,尽管我认为我的composer.json中的以下内容应该解决这个问题:
"repositories": [ {
"type": "vcs",
"url": "https://github.com/gridiron-guru/FantasyDataAPI"
}],
我猜我不能只是下载src并将其粘贴到我的供应商目录中,因为composer需要生成自动加载和其他gubbins
有什么想法可以让这个包进入我的项目吗?包的名称是错误的(在官方的bundle文档上也是错误的)。 根据库的composer.json,正确的名称是
“gridiron guru/fantasy数据api”
因此,尝试在composer.json
中替换这一行:
"gridiron-guru/FantasyDataAPI" : "1.*"
为此:
"gridiron-guru/fantasy-data-api" : "1.*"
我看到你在库上打开了一个问题,你能用一个提交请求来修复它吗?包的名称是错误的(在官方的bundle文档上也是如此)。 根据库的composer.json,正确的名称是
“gridiron guru/fantasy数据api”
因此,尝试在composer.json
中替换这一行:
"gridiron-guru/FantasyDataAPI" : "1.*"
为此:
"gridiron-guru/fantasy-data-api" : "1.*"
我看到你在库上打开了一个问题,你能用一个提交请求来修复它吗?包的名称是错误的(在官方的bundle文档上也是如此)。 根据库的composer.json,正确的名称是
“gridiron guru/fantasy数据api”
因此,尝试在composer.json
中替换这一行:
"gridiron-guru/FantasyDataAPI" : "1.*"
为此:
"gridiron-guru/fantasy-data-api" : "1.*"
我看到你在库上打开了一个问题,你能用一个提交请求来修复它吗?包的名称是错误的(在官方的bundle文档上也是如此)。 根据库的composer.json,正确的名称是
“gridiron guru/fantasy数据api”
因此,尝试在composer.json
中替换这一行:
"gridiron-guru/FantasyDataAPI" : "1.*"
为此:
"gridiron-guru/fantasy-data-api" : "1.*"
我看到您在库中打开了一个问题,您可以通过请求提供解决方案来解决吗?尝试在PackageGist上发布您的包,这样您就不需要:
"repositories": [ {
"type": "vcs",
"url": "https://github.com/gridiron-guru/FantasyDataAPI"
}],
这样,您只需在发布稳定版本后更改composer.json中的版本
你的作曲者看起来像:
"require": {
...
"gridiron-guru/FantasyDataAPI" : "dev-master" // or whatever branch
}
现在您只需要运行composer更新——首选源代码
另外,看看这个链接,当我尝试做类似的事情时,它帮助了我
composer选项--preference source是在供应商目录中克隆包的git repository>。要查看存储库的更改或提交,只需>chdir到包的根目录
尝试在PackageGist上发布您的软件包,这样您就不再需要:
"repositories": [ {
"type": "vcs",
"url": "https://github.com/gridiron-guru/FantasyDataAPI"
}],
这样,您只需在发布稳定版本后更改composer.json中的版本
你的作曲者看起来像:
"require": {
...
"gridiron-guru/FantasyDataAPI" : "dev-master" // or whatever branch
}
现在您只需要运行composer更新——首选源代码
另外,看看这个链接,当我尝试做类似的事情时,它帮助了我
composer选项--preference source是在供应商目录中克隆包的git repository>。要查看存储库的更改或提交,只需>chdir到包的根目录
尝试在PackageGist上发布您的软件包,这样您就不再需要:
"repositories": [ {
"type": "vcs",
"url": "https://github.com/gridiron-guru/FantasyDataAPI"
}],
这样,您只需在发布稳定版本后更改composer.json中的版本
你的作曲者看起来像:
"require": {
...
"gridiron-guru/FantasyDataAPI" : "dev-master" // or whatever branch
}
现在您只需要运行composer更新——首选源代码
另外,看看这个链接,当我尝试做类似的事情时,它帮助了我
composer选项--preference source是在供应商目录中克隆包的git repository>。要查看存储库的更改或提交,只需>chdir到包的根目录
尝试在PackageGist上发布您的软件包,这样您就不再需要:
"repositories": [ {
"type": "vcs",
"url": "https://github.com/gridiron-guru/FantasyDataAPI"
}],
这样,您只需在发布稳定版本后更改composer.json中的版本
你的作曲者看起来像:
"require": {
...
"gridiron-guru/FantasyDataAPI" : "dev-master" // or whatever branch
}
现在您只需要运行composer更新——首选源代码
另外,看看这个链接,当我尝试做类似的事情时,它帮助了我
composer选项--preference source是在供应商目录中克隆包的git repository>。要查看存储库的更改或提交,只需>chdir到包的根目录
你好,谢谢你,我会把这个请求添加到我留下的评论中,不太确定如何拉,但我会试试!没问题@DizzyBryanHigh只是对开源项目做出贡献的一种方式!修复文档是一项简单的任务,开发人员通常会欣赏它(而不是自己修复它)。让我知道,否则我会为你做的。但是,我的解决方案还可以吗?现在工作了吗?是的,工作得很好!!ypu救了我天知道还有多少时间!!,我将提出拉请求,我现在正在看它!提出了我的第一个请求!!太棒了@DizzyBryanHigh!试着在你的PRHi那里链接这个问题,谢谢你,我会把这个请求添加到我留下的评论中,不太确定如何拉,但我会尝试!没问题@DizzyBryanHigh只是对开源项目做出贡献的一种方式!修复文档是一项简单的任务,开发人员通常会欣赏它(而不是自己修复它)。让我知道,否则我会为你做的。但是,我的解决方案还可以吗?现在工作了吗?是的,工作得很好!!ypu救了我天知道还有多少时间!!,我会提出拉我的请求的