Skip to content
Snippets Groups Projects
Commit 89b1f986 authored by Hoop, Bert Jan de's avatar Hoop, Bert Jan de
Browse files

L05DOCBST-41 add README.md

explain how to use this repository as a composer dependency
in a project
parent e941fcd2
No related branches found
No related tags found
No related merge requests found
To use this repository as a dependency in composer.json
add the following lines:
```javascript
"repositories": [
{
"type": "gitlab",
"url": "https://git.wur.nl/library/php-modules.git"
}
],
```
This instructs composer to check the library/php-modules repository.
For composer to be able the correctly access the repository it must
be told that it is een alternative gitlab server (domain):
```javascript
"config": {
"gitlab-domains": ["git.wur.nl"]
},
```
And composer needs a personal access token to authenticate at the git.wur.nl server.
Create a personal access token on the git.wur.nl server (in your profile)
and at it to the file '$HOME/.composer/auth.json':
```javascript
{
"bitbucket-oauth": {},
"github-oauth": {},
"gitlab-oauth": {},
"gitlab-token": { "git.wur.nl": "my-secret-access-token" }
}
```
Now you can at the dependency:
```javascript
"require": {
"library/php-modules": ">=0.0.2"
},
```
and run 'composer install' or 'composer update'.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment