composerで特定のリビジョンのパッケージを取得する

こちらがわかりやすいです。

akamist.com

なるほどなー!

"{vendor}/{package}" : "dev-{branch}#{hash}"

って書けばええんやな!やったろ!

"laravel/socialite": "dev-3.0#79316f3"

実行!

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

あれっいかない!
となったわけです。

ドキュメントにちゃんと書いてありました。

When branch names look like versions, we have to clarify for composer that we're trying to check out a branch and not a tag. In the above example, we have two version branches: v1 and v2. To get Composer to check out one of these branches, you must specify a version constraint that looks like this: v1.x-dev. The .x is an arbitrary string that Composer requires to tell it that we're talking about the v1 branch and not a v1 tag (alternatively, you can name the branch v1.x instead of v1). In the case of a branch with a version-like name (v1, in this case), you append -dev as a suffix, rather than using dev- as a prefix.

getcomposer.org

つまるところ、「ブランチ名がバージョン名っぽい感じのときは最後に .x-devってつけてね」とのこと。

こちらが正解でした。

"laravel/socialite": "3.0.x-dev#79316f3"