6.5 KiB
6.5 KiB
Composer Tasks
DumpAutoload
Composer Dump Autoload
<?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()*return$thispreferDist()addsprefer-distoption to composerpreferSource()addsprefer-sourceoption to composernoDev()addsno-devoption to composernoAnsi()addsno-ansioption to composeransi()addsansioption to composeroptimizeAutoloader()addsoptimize-autoloaderoption to composerdir($dir)Changes working directory of commandprinted($arg)Should command output be printedarg($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)Pass option to executable. Options are prefixed with--, value can be provided in second parameter.optionList($option, $value = null)Pass multiple options to executable. Value can be a string or array.
Install
Composer Install
<?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();
?>
preferDist()addsprefer-distoption to composerpreferSource()addsprefer-sourceoption to composernoDev()addsno-devoption to composernoAnsi()addsno-ansioption to composeransi()addsansioption to composeroptimizeAutoloader()addsoptimize-autoloaderoption to composerdir($dir)Changes working directory of commandprinted($arg)Should command output be printedarg($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)Pass option to executable. Options are prefixed with--, value can be provided in second parameter.optionList($option, $value = null)Pass multiple options to executable. Value can be a string or array.
Remove
Composer Validate
<?php
// simple execution
$this->taskComposerValidate()->run();
?>
dev()*return$thisnoProgress()*return$thisnoUpdate()*return$thisupdateNoDev()*return$thisnoUpdateWithDependencies()*return$thispreferDist()addsprefer-distoption to composerpreferSource()addsprefer-sourceoption to composernoDev()addsno-devoption to composernoAnsi()addsno-ansioption to composeransi()addsansioption to composeroptimizeAutoloader()addsoptimize-autoloaderoption to composerdir($dir)Changes working directory of commandprinted($arg)Should command output be printedarg($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)Pass option to executable. Options are prefixed with--, value can be provided in second parameter.optionList($option, $value = null)Pass multiple options to executable. Value can be a string or array.
Update
Composer Update
<?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();
?>
preferDist()addsprefer-distoption to composerpreferSource()addsprefer-sourceoption to composernoDev()addsno-devoption to composernoAnsi()addsno-ansioption to composeransi()addsansioption to composeroptimizeAutoloader()addsoptimize-autoloaderoption to composerdir($dir)Changes working directory of commandprinted($arg)Should command output be printedarg($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)Pass option to executable. Options are prefixed with--, value can be provided in second parameter.optionList($option, $value = null)Pass multiple options to executable. Value can be a string or array.
Validate
Composer Validate
<?php
// simple execution
$this->taskComposerValidate()->run();
?>
noCheckAll()*return$thisnoCheckLock()*return$thisnoCheckPublish()*return$thiswithDependencies()*return$thisstrict()*return$thispreferDist()addsprefer-distoption to composerpreferSource()addsprefer-sourceoption to composernoDev()addsno-devoption to composernoAnsi()addsno-ansioption to composeransi()addsansioption to composeroptimizeAutoloader()addsoptimize-autoloaderoption to composerdir($dir)Changes working directory of commandprinted($arg)Should command output be printedarg($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)Pass option to executable. Options are prefixed with--, value can be provided in second parameter.optionList($option, $value = null)Pass multiple options to executable. Value can be a string or array.