composer
This module provides a way to install composer dependencies in a directory for aPHP project. It uses the composer image to install the dependencies and returns the
vendor directory with the dependencies installed.
Installation
dagger install github.com/jasonmccallister/dagger-composer@fc0ac11599eb68c165bd8ba30072ab9c1300aa41
Entrypoint
Return Type
Composer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | "latest" | The version of the composer image to use. |
source | Directory | - | The directory that contains the composer.json/composer.lock files. |
enableCache | Boolean | true | Enable or disable the composer cache. |
cacheName | String | "composer" | The name to use for the cache volume |
Example
dagger -m github.com/jasonmccallister/dagger-composer@fc0ac11599eb68c165bd8ba30072ab9c1300aa41 call \
func (m *myModule) example() *Composer {
return dag.
Composer()
}
@function
def example() -> dag.Composer:
return (
dag.composer()
)
@func()
example(): Composer {
return dag
.composer()
}
Types
Composer 🔗
install() 🔗
Takes a directory and installs composer dependencies.
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] | ["--prefer-dist", "--optimize-autoloader", "--ignore-platform-reqs"] | Additional arguments to pass to the composer install command. |
Example
dagger -m github.com/jasonmccallister/dagger-composer@fc0ac11599eb68c165bd8ba30072ab9c1300aa41 call \
install
func (m *myModule) example() *Directory {
return dag.
Composer().
Install()
}
@function
def example() -> dagger.Directory:
return (
dag.composer()
.install()
)
@func()
example(): Directory {
return dag
.composer()
.install()
}