function BaseCommand::getComposer
Parameters
bool $required Should be set to false, or use `requireComposer` instead:
bool|null $disablePlugins If null, reads --no-plugins as default:
bool|null $disableScripts If null, reads --no-scripts as default:
Return value
Composer|null
Throws
\RuntimeException
Deprecated
since Composer 2.3.0 use requireComposer or tryComposer depending on whether you have $required set to true or false
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ BaseCommand.php, line 78
Class
- BaseCommand
- Base class for Composer commands
Namespace
Composer\CommandCode
public function getComposer(bool $required = true, ?bool $disablePlugins = null, ?bool $disableScripts = null) {
if ($required) {
return $this->requireComposer($disablePlugins, $disableScripts);
}
return $this->tryComposer($disablePlugins, $disableScripts);
}