So how does the \"replace\" property work with composer? I have read the composer document but still not understand it. Searching for more info hasn\'t answered my questions.
When you create your own package, you define in your composer.json
what kind of packages does it provide which basically tells Composer that your package has it already installed, so no need to install it again.
If you use replace property, it tells Composer that your package wants to replace the original package with your own fork, so other packages don't need to install it.
For example if a/a
package requires b/b
and you tell to replace b/b
, it won't be downloaded on Composer install
/update
.
This is explained in more details in here: How does the “replace” property work in Composer?