1
0
Fork 0

Clarify package link docs a little, refs #9569

pull/9594/head
Jordi Boggiano 2021-01-08 09:29:25 +01:00
parent 296bab1292
commit 19eef374d0
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 9 additions and 7 deletions

View File

@ -401,19 +401,19 @@ Example:
#### require
Lists packages required by this package. The package will not be installed
Map of packages required by this package. The package will not be installed
unless those requirements can be met.
#### require-dev <span>([root-only](04-schema.md#root-package))</span>
Lists packages required for developing this package, or running
Map of packages required for developing this package, or running
tests, etc. The dev requirements of the root package are installed by default.
Both `install` or `update` support the `--no-dev` option that prevents dev
dependencies from being installed.
#### conflict
Lists packages that conflict with this version of this package. They
Map of packages that conflict with this version of this package. They
will not be allowed to be installed together with your package.
Note that when specifying ranges like `<1.0 >=1.1` in a `conflict` link,
@ -423,7 +423,7 @@ probably want to go for `<1.0 || >=1.1` in this case.
#### replace
Lists packages that are replaced by this package. This allows you to fork a
Map of packages that are replaced by this package. This allows you to fork a
package, publish it under a different name with its own version numbers, while
packages requiring the original package continue to work with your fork because
it replaces the original package.
@ -441,10 +441,12 @@ that exact version, and not any other version, which would be incorrect.
#### provide
List of other packages that are provided by this package. This is mostly
Map of packages that are provided by this package. This is mostly
useful for implementations of common interfaces. A package could depend on
some virtual `logger-implementation` package, any library that implements
this logger interface would list it in `provide`.
some virtual package e.g. `psr/logger-implementation`, any library that implements
this logger interface would list it in `provide`. Implementors can then
be [found on Packagist.org](https://packagist.org/providers/psr/log-implementation).
Using `provide` with the name of an actual package rather than a virtual one
implies that the code of that package is also shipped, in which case `replace`
is generally a better choice. A common convention for packages providing an