|
|
|
@ -13,7 +13,6 @@ If a package contains other scripts that are not needed by the package
|
|
|
|
|
users (like build or compile scripts) that code should not be listed
|
|
|
|
|
as a vendor binary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## How is it defined?
|
|
|
|
|
|
|
|
|
|
It is defined by adding the `bin` key to a project's `composer.json`.
|
|
|
|
@ -34,12 +33,10 @@ for any project that **depends** on that project.
|
|
|
|
|
This is a convenient way to expose useful scripts that would
|
|
|
|
|
otherwise be hidden deep in the `vendor/` directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## What happens when Composer is run on a composer.json that defines vendor binaries?
|
|
|
|
|
|
|
|
|
|
For the binaries that a package defines directly, nothing happens.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## What happens when Composer is run on a composer.json that has dependencies with vendor binaries listed?
|
|
|
|
|
|
|
|
|
|
Composer looks for the binaries defined in all of the dependencies. A
|
|
|
|
@ -75,7 +72,6 @@ In this case, Composer will make `vendor/my-vendor/project-a/bin/project-a-bin`
|
|
|
|
|
available as `vendor/bin/project-a-bin`. On a Unix-like platform
|
|
|
|
|
this is accomplished by creating a symlink.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## What about Windows and .bat files?
|
|
|
|
|
|
|
|
|
|
Packages managed entirely by Composer do not *need* to contain any
|
|
|
|
@ -90,7 +86,6 @@ Packages that need to support workflows that may not include Composer
|
|
|
|
|
are welcome to maintain custom `.bat` files. In this case, the package
|
|
|
|
|
should **not** list the `.bat` file as a binary as it is not needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Can vendor binaries be installed somewhere other than vendor/bin?
|
|
|
|
|
|
|
|
|
|
Yes, there are two ways an alternate vendor binary location can be specified:
|
|
|
|
|