Skip to content

Commit

Permalink
[docs] move lib lockfile notes into lib chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
igorw committed Mar 27, 2012
1 parent d0cfe35 commit ea19aba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions doc/01-basic-usage.md
Expand Up @@ -115,9 +115,8 @@ the lock file with the new version.

$ php composer.phar update

> **Note:** For your library you may commit the `composer.lock` file too, but it
> will not have any effect on other projects that depend on it. See also
> [Libraries - Lock file](02-libraries.md#lock-file).
> **Note:** For libraries it is not necessarily recommended to commit the lock file,
> see also: [Libraries - Lock file](02-libraries.md#lock-file).
## Packagist

Expand Down
14 changes: 6 additions & 8 deletions doc/02-libraries.md
Expand Up @@ -78,15 +78,13 @@ See [Repositories](05-repositories.md) for more information.

## Lock file

For projects it is recommended to commit the `composer.lock` file into version
control. For libraries this is not the case. You do not want your library to
be tied to exact versions of the dependencies. It should work with any
compatible version, so make sure you specify your version constraints so that
they include all compatible versions.
For your library you may commit the `composer.lock` file if you want to. This
can help your team to always test against the same dependency versions.
However, this lock file will not have any effect on other projects that depend
on it. It only has an effect on the main project.

**Do not commit your library's `composer.lock` into version control.**

If you are using git, add it to the `.gitignore`.
If you do not want to commit the lock file and you are using git, add it to
the `.gitignore`.

## Publishing to a VCS

Expand Down

0 comments on commit ea19aba

Please sign in to comment.