Dagger
Search

composer

This module provides a way to install composer dependencies in a directory for a
PHP 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@3e8782e93482e9f9c243321bbe7b435c1ae7c564

Entrypoint

Return Type
Composer !
Arguments
NameTypeDefault ValueDescription
versionString "latest"The version of the composer image to use.
Example
dagger -m github.com/jasonmccallister/dagger-composer@3e8782e93482e9f9c243321bbe7b435c1ae7c564 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@3e8782e93482e9f9c243321bbe7b435c1ae7c564 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
NameTypeDefault ValueDescription
dirDirectory -The directory that contains the composer.json/composer.lock files.
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@3e8782e93482e9f9c243321bbe7b435c1ae7c564 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()
}