Let's consider we want to try the v1.0.0-rc2
on our package rstriquer/eloquent-logger
hosted on github
.
First you got to add the repository
definition at your project's composer.json
file:
"repositories": [
{
"type":"package",
"package": {
"name": "rstriquer/eloquent-logger",
"version":"v1.0.0-rc2",
"source": {
"url": "https://github.com/rstriquer/eloquent-logger.git",
"type": "git",
"reference":"main"
}
}
}
]
Thenk you add the "rstriquer/eloquent-logger": "v1.0.0-rc2"
item in the require
json part you intent to. In this case
this package shoud be installed on the dev environment only therefore we add it at the require-dev
json item.
"require-dev": {
"other/sample-pack": "whatever-version-sample",
"rstriquer/eloquent-logger": "v1.0.0-rc2"
}
The same goes for if you want to test a branch. Just change the the TAG name both on repositories
and on require-dev
to
the name of the branch you want to test.