Methods |
public
|
__construct(Filesystem $files, string|null $workingPath = null): void
Create a new Composer manager instance.
Create a new Composer manager instance.
|
#
|
public
|
hasPackage(string $package): bool
Determine if the given Composer package is installed.
Determine if the given Composer package is installed.
|
#
|
public
|
requirePackages(
array<int, string> $packages,
bool $dev = false,
Closure|OutputInterface|null $output = null,
string|null $composerBinary = null,
): bool
Install the given Composer packages into the application.
Install the given Composer packages into the application.
|
#
|
public
|
removePackages(
array<int, string> $packages,
bool $dev = false,
Closure|OutputInterface|null $output = null,
string|null $composerBinary = null,
): bool
Remove the given Composer packages from the application.
Remove the given Composer packages from the application.
|
#
|
public
|
modify(callable(array): array $callback): void
Modify the "composer.json" file contents using the given callback.
Modify the "composer.json" file contents using the given callback.
|
#
|
public
|
dumpAutoloads(string|array $extra = '', string|null $composerBinary = null): int
Regenerate the Composer autoloader files.
Regenerate the Composer autoloader files.
|
#
|
public
|
dumpOptimized(string|null $composerBinary = null): int
Regenerate the optimized Composer autoloader files.
Regenerate the optimized Composer autoloader files.
|
#
|
public
|
findComposer(string|null $composerBinary = null): array
Get the Composer binary / command for the environment.
Get the Composer binary / command for the environment.
|
#
|
protected
|
findComposerFile(): string
Get the path to the "composer.json" file.
Get the path to the "composer.json" file.
|
#
|
protected
|
phpBinary(): string
Get the PHP binary.
|
#
|
protected
|
getProcess(array $command, array $env = []): Process
Get a new Symfony process instance.
Get a new Symfony process instance.
|
#
|
public
|
setWorkingPath(string $path): $this
Set the working path used by the class.
Set the working path used by the class.
|
#
|
public
|
getVersion(): string|null
Get the version of Composer.
Get the version of Composer.
|
#
|