1
0
Fork 0

Merge pull request #4416 from sroze/path-repository-documentation

Add documentation about the `path` repository
pull/4418/head
Jordi Boggiano 2015-09-14 11:03:58 +01:00
commit 320086dcc0
1 changed files with 33 additions and 0 deletions

View File

@ -606,6 +606,39 @@ imported. When an archive with a newer version is added in the artifact folder
and you run `update`, that version will be imported as well and Composer will and you run `update`, that version will be imported as well and Composer will
update to the latest version. update to the latest version.
### Path
In addition to the artifact repository, you can use the path one, which allow
you to depends on a relative directory. This can be especially useful when dealing
with monolith repositories.
For instance, if you have the following directory structure in your repository:
```
- apps
\_ my-app
\_ composer.json
- packages
\_ my-package
\_ composer.json
```
Then, to add the package `my/package` as a dependency, in your `apps/my-app/composer.json`
file, you can use the following configuration:
```json
{
"repositories": [
{
"type": "path",
"url": "../../packages/my-package"
}
],
"require": {
"my/package": "*@dev"
}
}
```
## Disabling Packagist ## Disabling Packagist
You can disable the default Packagist repository by adding this to your You can disable the default Packagist repository by adding this to your