Clarify standard replace use case
parent
7c7cac61b6
commit
9c9391fc43
|
@ -247,16 +247,19 @@ will not be allowed to be installed together with your package.
|
||||||
|
|
||||||
#### replace
|
#### replace
|
||||||
|
|
||||||
Lists packages that are replaced by this package.
|
Lists 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.
|
||||||
|
|
||||||
This is useful for packages that contain sub-packages, for example the main
|
This is also useful for packages that contain sub-packages, for example the main
|
||||||
symfony/symfony package contains all the Symfony Components which are also
|
symfony/symfony package contains all the Symfony Components which are also
|
||||||
available as individual packages. If you require the main package it will
|
available as individual packages. If you require the main package it will
|
||||||
automatically fulfill any requirement of one of the individual components,
|
automatically fulfill any requirement of one of the individual components,
|
||||||
since it replaces them.
|
since it replaces them.
|
||||||
|
|
||||||
Caution is advised when using replace however, for the sub-package example
|
Caution is advised when using replace for the sub-package purpose explained
|
||||||
above you should typically only replace using `self.version` as a version
|
above. You should then typically only replace using `self.version` as a version
|
||||||
constraint, to make sure the main package only replaces the sub-packages of
|
constraint, to make sure the main package only replaces the sub-packages of
|
||||||
that exact version, and not any other version, which would be incorrect.
|
that exact version, and not any other version, which would be incorrect.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue