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@2cb232e39978512e9fcf1bf9989d097eec693d6a
Entrypoint
Return Type
Composer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | "latest" | The version of the composer image to use. |
Example
dagger -m github.com/jasonmccallister/dagger-composer@2cb232e39978512e9fcf1bf9989d097eec693d6a 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 🔗
version() 🔗
Return Type
String !
Example
dagger -m github.com/jasonmccallister/dagger-composer@2cb232e39978512e9fcf1bf9989d097eec693d6a call \
version
func (m *myModule) example(ctx context.Context) string {
return dag.
Composer().
Version(ctx)
}
@function
async def example() -> str:
return await (
dag.composer()
.version()
)
@func()
async example(): Promise<string> {
return dag
.composer()
.version()
}
install() 🔗
Takes a directory and installs composer dependencies.
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory | - | No description provided |
args | [String ! ] | ["--prefer-dist", "--optimize-autoloader", "--ignore-platform-reqs"] | No description provided |
Example
dagger -m github.com/jasonmccallister/dagger-composer@2cb232e39978512e9fcf1bf9989d097eec693d6a 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()
}