Php 如何向PackageGist添加新的软件包版本?

Php 如何向PackageGist添加新的软件包版本?,php,git,github,release,packagist,Php,Git,Github,Release,Packagist,我在向PackageGist添加新软件包版本时遇到问题 我的项目在Git Hub上(带有webhooks),开发版本和第一个发布版本已成功添加到packagist,但当我尝试创建新版本时,它没有显示在packagist上。。。这是我的git日志: damjan@damjan-dev:~/www/projects/stripe/new-release$ git clone https://github.com/skydriver/stripe-request.git Cloning into

我在向PackageGist添加新软件包版本时遇到问题

我的项目在Git Hub上(带有webhooks),开发版本和第一个发布版本已成功添加到packagist,但当我尝试创建新版本时,它没有显示在packagist上。。。这是我的git日志:

damjan@damjan-dev:~/www/projects/stripe/new-release$ git clone https://github.com/skydriver/stripe-request.git
Cloning into 'stripe-request'...
remote: Counting objects: 38, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 38 (delta 15), reused 21 (delta 5), pack-reused 0
Unpacking objects: 100% (38/38), done.
Checking connectivity... done.
...
damjan@damjan-dev:~/www/projects/stripe$ cd new-release/stripe-request/
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ git add .
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ git commit -m "New release"
[master fc9a023] New release
 1 file changed, 349 insertions(+)
 create mode 100644 StripeRequest.php
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ git push origin master 
Username for 'https://github.com': SkyDriver
Password for 'https://SkyDriver@github.com': 
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 2.42 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://github.com/skydriver/stripe-request.git
   4ea2a02..fc9a023  master -> master
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ git tag -a 1.0.2
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ git push --tags 
Username for 'https://github.com': SkyDriver
Password for 'https://SkyDriver@github.com': 
Counting objects: 1, done.
Writing objects: 100% (1/1), 175 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To https://github.com/skydriver/stripe-request.git
 * [new tag]         1.0.2 -> 1.0.2
damjan@damjan-dev:~/www/projects/stripe/new-release/stripe-request$ 
有人能帮我吗

谢谢。

一切正常!(几乎

您的最新提交(在编写此答案时)是
fc9a023dcd03cf37f8a15b978d92eb40aa8b0de8
。在PackageGist上查看
dev master
version时,我看到了相同的提交散列。这里一切都好

除了一件事 您已经在
composer.json
中指定了
version
字段。把它拿走!这就是为什么您被困在
1.0.0
上的原因

Packagist上的
1.0.0
等版本与Github上的标签相对应。只需标记提交并推送它(
gitpush--tags
)。很快这个版本就在Packagegist中被知道了

附言:包装商有时会有一些滞后,可能是几分钟。耐心点:)

dev master
的提交散列与Github上的最新版本相对应,这一事实证明了钩子正在工作

PPS:运行
composer.phar验证
并修复它所抱怨的一切


购买力平价:您尚未将
composer.lock
文件添加到git。这(在这种情况下)可以被视为一件好事!因为它是一个库,当您启用CI时,CI将使用最新版本的依赖项,这可以警告您未来的不兼容性。但是,如果一个项目不是其他项目的依赖项,请始终添加te lock文件。

非常感谢Jasper!现在,一切正常。问题出在composer.json文件中的版本中。我应该学习更多关于“如何使用作曲家”的知识:)再次感谢!最好的问候。Np!如果您对Composer有任何疑问,请查找
@rdohms
(在twitter上)或
@seldaek
(作者)!他们真是好人。当然也可以这样使用:)