$path_to_composer_home
$path_to_composer_home :
install(array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Reads the composer.json file from the current directory, resolves the dependencies, and installs them: see https://getcomposer.org/doc/03-cli.md#install
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
update(array $package_names = null, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Updates dependencies to the latest possible version and updates the composer.lock file: see https://getcomposer.org/doc/03-cli.md#update E.g.
$composer->update() will update all dependencies while $composer->update(array('symfony/css-crawler'), array('--optimize-autoloader')) will update only the CSS crawler symfony component optimizing the autoloader afterwards.
array | $package_names | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
requirePackage(array $package_names, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Installes one or more packages: see https://getcomposer.org/doc/03-cli.md#require.
E.g. $composer->require(array('monolog/monolog:~1.16', 'slim/slim')) will install monolog in version 1.16 or later and the Slim framework in the latest available version.
array | $package_names | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
remove(array $package_names, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Uninstalles one or more packages: see https://getcomposer.org/doc/03-cli.md#remove.
E.g. $composer->remove(array('monolog/monolog', 'slim/slim')) will uninstall monolog in version 1.16 or later and the Slim framework in the latest available version.
array | $package_names | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
search(array $search_terms, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Search through the current project's package repositories: see https://getcomposer.org/doc/03-cli.md#search
array | $search_terms | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
show(array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Lists all installed packages: see https://getcomposer.org/doc/03-cli.md#show.
E.g. $composer->show(array('--latest')) will show all packages with the respective latest version available
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
outdated(array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Shows a list of installed packages that have updates available, including their current and latest versions: see https://getcomposer.org/doc/03-cli.md#outdated E.g.
$composer->outdated() will list only outdated packages while $composer->outdated(array('--all')) will list alle packages installed with the respective latest versions.
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
suggests(array $package_names = null, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Lists all packages suggested by currently installed set of packages: see https://getcomposer.org/doc/03-cli.md#suggests.
E.g. $composer->suggests(array('monolog/monolog', 'slim/slim'), array('--by-package')) will show packages suggested by monolog and Slim grouped by package
array | $package_names | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
depends(string $package_name, $version = null, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Tells you which other packages depend on a certain package: see https://getcomposer.org/doc/03-cli.md#depends.
E.g. $composer->depends('doctrine/lexer', array('--tree')) will show packages, that require the doctrine lexer with all subrequirements in the form of a tree.
string | $package_name | |
$version | ||
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
prohibits(string $package_name, $version = null, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Tells you which packages are blocking a given package from being installed: see https://getcomposer.org/doc/03-cli.md#prohibits.
E.g. $composer->prohibits('symfony/symfony', '3.1', array('--tree')) will show packages in your current project, that would prevent the installation of Symfony 3.1 with all their subrequirements in the form of a tree.
string | $package_name | |
$version | ||
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
validate(array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Validates the composer.json file: see https://getcomposer.org/doc/03-cli.md#validate
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |
config(string $setting_key, array $setting_values, array $options = null, \Symfony\Component\Console\Output\OutputInterface $output = null) : \Symfony\Component\Console\Output\OutputInterface
Edits config settings and repositories in either the composer.json file: see https://getcomposer.org/doc/03-cli.md#config
string | $setting_key | |
array | $setting_values | |
array | $options | |
\Symfony\Component\Console\Output\OutputInterface | $output |