class InitCommand extends BaseCommand (View source)

Properties

protected CompositeRepository $repos

Methods

getComposer(bool $required = true, bool|null $disablePlugins = null)

No description

setComposer(Composer $composer)

No description

resetComposer()

Removes the cached composer instance

bool
isProxyCommand()

Whether or not this command is meant to call another command.

getIO()

No description

setIO(IOInterface $io)

No description

initialize(InputInterface $input, OutputInterface $output)

{@inheritDoc}

bool[]
getPreferredInstallOptions(Config $config, InputInterface $input, bool $keepVcsRequiresPreferSource = false)

Returns preferSource and preferDist values based on the configuration.

configure()

{@inheritdoc}

execute(InputInterface $input, OutputInterface $output)

{@inheritdoc}

interact(InputInterface $input, OutputInterface $output)

{@inheritdoc}

array
parseAuthorString(string $author)

No description

findPackages($name)

No description

getRepos()

No description

determineRequirements(InputInterface $input, OutputInterface $output, $requires = array(), $phpVersion = null, $preferredStability = 'stable')

No description

formatAuthors($author)

No description

formatRequirements(array $requirements)

No description

getGitConfig()

No description

bool
hasVendorIgnore(string $ignoreFile, string $vendor = 'vendor')

Checks the local .gitignore file for the Composer vendor directory.

normalizeRequirements(array $requirements)

No description

addVendorIgnore($ignoreFile, $vendor = '/vendor/')

No description

isValidEmail($email)

No description

Details

Composer getComposer(bool $required = true, bool|null $disablePlugins = null)

Parameters

bool $required
bool|null $disablePlugins

Return Value

Composer

Exceptions

RuntimeException

setComposer(Composer $composer)

Parameters

Composer $composer

resetComposer()

Removes the cached composer instance

bool isProxyCommand()

Whether or not this command is meant to call another command.

This is mainly needed to avoid duplicated warnings messages.

Return Value

bool

IOInterface getIO()

Return Value

IOInterface

setIO(IOInterface $io)

Parameters

IOInterface $io

protected initialize(InputInterface $input, OutputInterface $output)

{@inheritDoc}

Parameters

InputInterface $input
OutputInterface $output

protected bool[] getPreferredInstallOptions(Config $config, InputInterface $input, bool $keepVcsRequiresPreferSource = false)

Returns preferSource and preferDist values based on the configuration.

Parameters

Config $config
InputInterface $input
bool $keepVcsRequiresPreferSource

Return Value

bool[] An array composed of the preferSource and preferDist values

protected configure()

{@inheritdoc}

protected execute(InputInterface $input, OutputInterface $output)

{@inheritdoc}

Parameters

InputInterface $input
OutputInterface $output

protected interact(InputInterface $input, OutputInterface $output)

{@inheritdoc}

Parameters

InputInterface $input
OutputInterface $output

array parseAuthorString(string $author)

Parameters

string $author

Return Value

array

protected findPackages($name)

Parameters

$name

protected getRepos()

protected determineRequirements(InputInterface $input, OutputInterface $output, $requires = array(), $phpVersion = null, $preferredStability = 'stable')

Parameters

InputInterface $input
OutputInterface $output
$requires
$phpVersion
$preferredStability

protected formatAuthors($author)

Parameters

$author

protected formatRequirements(array $requirements)

Parameters

array $requirements

protected getGitConfig()

protected bool hasVendorIgnore(string $ignoreFile, string $vendor = 'vendor')

Checks the local .gitignore file for the Composer vendor directory.

Tested patterns include: "/$vendor" "$vendor" "$vendor/" "/$vendor/" "/$vendor/" "$vendor/"

Parameters

string $ignoreFile
string $vendor

Return Value

bool

protected normalizeRequirements(array $requirements)

Parameters

array $requirements

protected addVendorIgnore($ignoreFile, $vendor = '/vendor/')

Parameters

$ignoreFile
$vendor

protected isValidEmail($email)

Parameters

$email