Composer Tasks
CheckPlatformReqs
Composer Check Platform Requirements
php
<?php
// simple execution
$this->taskComposerValidate()->run();
?>
preferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Config
Composer Config
php
<?php
// simple execution
$this->taskComposerConfig()->set('bin-dir', 'bin/')->run();
?>
set($key, $value)
Set a configuration value.useGlobal($useGlobal = null)
Operate on the global repositoryrepository($id, $uri, $repoType = null)
*param string
$idremoveRepository($id)
*param string
$iddisableRepository($id)
*param string
$idenableRepository($id)
*param string
$idpreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
CreateProject
Composer CreateProject
php
<?php
// simple execution
$this->taskComposerCreateProject()->source('foo/bar')->target('myBar')->run();
?>
source($source)
*param string
$sourcetarget($target)
*param string
$targetversion($version)
*param string
$versionkeepVcs($keep = null)
*param bool
$keepnoInstall($noInstall = null)
*param bool
$noInstallrepository($repository)
*param string
$repositorystability($stability)
*param string
$stabilitybuildCommand()
preferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composersetOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
DumpAutoload
Composer Dump Autoload
php
<?php
// simple execution
$this->taskComposerDumpAutoload()->run();
// dump auto loader with custom path
$this->taskComposerDumpAutoload('path/to/my/composer.phar')
->preferDist()
->run();
// optimize autoloader dump with custom path
$this->taskComposerDumpAutoload('path/to/my/composer.phar')
->optimize()
->run();
// optimize autoloader dump with custom path and no dev
$this->taskComposerDumpAutoload('path/to/my/composer.phar')
->optimize()
->noDev()
->run();
?>
optimize($optimize = null)
*param bool
$optimizepreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Init
Composer Init
php
<?php
// simple execution
$this->taskComposerInit()->run();
?>
projectName($projectName)
*param string
$projectNamedescription($description)
*param string
$descriptionauthor($author)
*param string
$authorprojectType($type)
*param string
$typehomepage($homepage)
*param string
$homepagedependency($project, $version = null)
'require' is a keyword, so it cannot be a method name.stability($stability)
*param string
$stabilitylicense($license)
*param string
$licenserepository($repository)
*param string
$repositorypreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Install
Composer Install
php
<?php
// simple execution
$this->taskComposerInstall()->run();
// prefer dist with custom path
$this->taskComposerInstall('path/to/my/composer.phar')
->preferDist()
->run();
// optimize autoloader with custom path
$this->taskComposerInstall('path/to/my/composer.phar')
->optimizeAutoloader()
->run();
?>
noSuggest($noSuggest = null)
addsno-suggest
option to composerpreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Remove
Composer Remove
php
<?php
// simple execution
$this->taskComposerRemove()->run();
?>
dev($dev = null)
*param bool
$devnoProgress($noProgress = null)
*param bool
$noProgressnoUpdate($noUpdate = null)
*param bool
$noUpdateupdateNoDev($updateNoDev = null)
*param bool
$updateNoDevnoUpdateWithDependencies($updateWithDependencies = null)
*param bool
$updateWithDependenciespreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
RequireDependency
Composer Require
php
<?php
// simple execution
$this->taskComposerRequire()->dependency('foo/bar', '^.2.4.8')->run();
?>
dependency($project, $version = null)
'require' is a keyword, so it cannot be a method name.noSuggest($noSuggest = null)
addsno-suggest
option to composerpreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Update
Composer Update
php
<?php
// simple execution
$this->taskComposerUpdate()->run();
// prefer dist with custom path
$this->taskComposerUpdate('path/to/my/composer.phar')
->preferDist()
->run();
// optimize autoloader with custom path
$this->taskComposerUpdate('path/to/my/composer.phar')
->optimizeAutoloader()
->run();
?>
noSuggest($noSuggest = null)
addsno-suggest
option to composerpreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Validate
Composer Validate
php
<?php
// simple execution
$this->taskComposerValidate()->run();
?>
noCheckAll($noCheckAll = null)
*param bool
$noCheckAllnoCheckLock($noCheckLock = null)
*param bool
$noCheckLocknoCheckPublish($noCheckPublish = null)
*param bool
$noCheckPublishwithDependencies($withDependencies = null)
*param bool
$withDependenciesstrict($strict = null)
*param bool
$strictpreferDist($preferDist = null)
addsprefer-dist
option to composerpreferSource()
addsprefer-source
option to composerdev($dev = null)
addsdev
option to composernoDev()
addsno-dev
option to composeransi($ansi = null)
addsansi
option to composernoAnsi()
addsno-ansi
option to composerinteraction($interaction = null)
*param bool
$interactionnoInteraction()
addsno-interaction
option to composeroptimizeAutoloader($optimize = null)
addsoptimize-autoloader
option to composerignorePlatformRequirements($ignore = null)
addsignore-platform-reqs
option to composerdisablePlugins($disable = null)
disable pluginsnoScripts($disable = null)
skip scriptsworkingDir($dir)
adds--working-dir $dir
option to composerbuildCommand()
Copy class fields into command options as directed.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.