How do I get Composer to download the latest commit in the master branch from GitHub for a package?

前端 未结 5 1200
一个人的身影
一个人的身影 2021-01-31 01:47

I am trying to get Composer do download the latest commit for the Behat/MinkSelenium2Driver package. That particular repo only has a master branch. I have tried every method I c

5条回答
  •  萌比男神i
    2021-01-31 02:40

    There is only one way to grab the head of the repository:

    "require": { "behat/mink-selenium2-driver" : "dev-master" }
    "minimum-stability": "dev"
    

    Oh well, at least two ways:

    "require": { "behat/mink-selenium2-driver" : "dev-master as 1.1.x-dev" }
    "minimum-stability": "dev"
    

    Probably at least three ways:

    "require": { "behat/mink-selenium2-driver" : "dev-master#2e73d8134ec8526b6e742f05c146fec2d5e1b8d6" }
    "minimum-stability": "dev"
    

    Because that repository actually aliased the master branch as 1.1.x-dev, this would also work without the minimum-stability affecting all other packages:

    "require": { "behat/mink-selenium2-driver" : "1.1.*@dev" }
    

提交回复
热议问题