class InstallationManager (View source)

Package operation manager.

Methods

reset()

No description

addInstaller(InstallerInterface $installer)

Adds installer

removeInstaller(InstallerInterface $installer)

Removes installer

disablePlugins()

Disables plugins.

getInstaller(string $type)

Returns installer for a specific package type.

bool
isPackageInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)

Checks whether provided package is installed in one of the registered installers.

ensureBinariesPresence(PackageInterface $package)

Install binary for the given package.

execute(RepositoryInterface $repo, OperationInterface $operation)

Executes solver operation.

install(RepositoryInterface $repo, InstallOperation $operation)

Executes install operation.

update(RepositoryInterface $repo, UpdateOperation $operation)

Executes update operation.

uninstall(RepositoryInterface $repo, UninstallOperation $operation)

Uninstalls package.

markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)

Executes markAliasInstalled operation.

markAliasUninstalled(RepositoryInterface $repo, MarkAliasUninstalledOperation $operation)

Executes markAlias operation.

string
getInstallPath(PackageInterface $package)

Returns the installation path of a package

notifyInstalls(IOInterface $io)

No description

Details

reset()

addInstaller(InstallerInterface $installer)

Adds installer

Parameters

InstallerInterface $installer installer instance

removeInstaller(InstallerInterface $installer)

Removes installer

Parameters

InstallerInterface $installer installer instance

disablePlugins()

Disables plugins.

We prevent any plugins from being instantiated by simply deactivating the installer for them. This ensure that no third-party code is ever executed.

InstallerInterface getInstaller(string $type)

Returns installer for a specific package type.

Parameters

string $type package type

Return Value

InstallerInterface

Exceptions

InvalidArgumentException if installer for provided type is not registered

bool isPackageInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)

Checks whether provided package is installed in one of the registered installers.

Parameters

InstalledRepositoryInterface $repo repository in which to check
PackageInterface $package package instance

Return Value

bool

ensureBinariesPresence(PackageInterface $package)

Install binary for the given package.

If the installer associated to this package doesn't handle that function, it'll do nothing.

Parameters

PackageInterface $package Package instance

execute(RepositoryInterface $repo, OperationInterface $operation)

Executes solver operation.

Parameters

RepositoryInterface $repo repository in which to check
OperationInterface $operation operation instance

install(RepositoryInterface $repo, InstallOperation $operation)

Executes install operation.

Parameters

RepositoryInterface $repo repository in which to check
InstallOperation $operation operation instance

update(RepositoryInterface $repo, UpdateOperation $operation)

Executes update operation.

Parameters

RepositoryInterface $repo repository in which to check
UpdateOperation $operation operation instance

uninstall(RepositoryInterface $repo, UninstallOperation $operation)

Uninstalls package.

Parameters

RepositoryInterface $repo repository in which to check
UninstallOperation $operation operation instance

markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)

Executes markAliasInstalled operation.

Parameters

RepositoryInterface $repo repository in which to check
MarkAliasInstalledOperation $operation operation instance

markAliasUninstalled(RepositoryInterface $repo, MarkAliasUninstalledOperation $operation)

Executes markAlias operation.

Parameters

RepositoryInterface $repo repository in which to check
MarkAliasUninstalledOperation $operation operation instance

string getInstallPath(PackageInterface $package)

Returns the installation path of a package

Parameters

PackageInterface $package

Return Value

string path

notifyInstalls(IOInterface $io)

Parameters

IOInterface $io