$io
$io : \Composer\IO\IOInterface
$io : \Composer\IO\IOInterface
$config : \Composer\Config
$package : \Composer\Package\RootPackageInterface
$downloadManager : \Composer\Downloader\DownloadManager
$repositoryManager : \Composer\Repository\RepositoryManager
$locker : \Composer\Package\Locker
$installationManager : \Composer\Installer\InstallationManager
$eventDispatcher : \Composer\EventDispatcher\EventDispatcher
$autoloadGenerator : \Composer\Autoload\AutoloadGenerator
$suggestedPackagesReporter : \Composer\Installer\SuggestedPackagesReporter
$additionalInstalledRepository : \Composer\Repository\RepositoryInterface
__construct(\Composer\IO\IOInterface $io, \Composer\Config $config, \Composer\Package\RootPackageInterface $package, \Composer\Downloader\DownloadManager $downloadManager, \Composer\Repository\RepositoryManager $repositoryManager, \Composer\Package\Locker $locker, \Composer\Installer\InstallationManager $installationManager, \Composer\EventDispatcher\EventDispatcher $eventDispatcher, \Composer\Autoload\AutoloadGenerator $autoloadGenerator)
Constructor
\Composer\IO\IOInterface | $io | |
\Composer\Config | $config | |
\Composer\Package\RootPackageInterface | $package | |
\Composer\Downloader\DownloadManager | $downloadManager | |
\Composer\Repository\RepositoryManager | $repositoryManager | |
\Composer\Package\Locker | $locker | |
\Composer\Installer\InstallationManager | $installationManager | |
\Composer\EventDispatcher\EventDispatcher | $eventDispatcher | |
\Composer\Autoload\AutoloadGenerator | $autoloadGenerator |
create(\Composer\IO\IOInterface $io, \Composer\Composer $composer) : \Composer\Installer
Create Installer
\Composer\IO\IOInterface | $io | |
\Composer\Composer | $composer |
setAdditionalInstalledRepository(\Composer\Repository\RepositoryInterface $additionalInstalledRepository) : $this
\Composer\Repository\RepositoryInterface | $additionalInstalledRepository |
setDryRun(boolean $dryRun = true) : \Composer\Installer
Whether to run in drymode or not
boolean | $dryRun |
setPreferSource(boolean $preferSource = true) : \Composer\Installer
prefer source installation
boolean | $preferSource |
setPreferDist(boolean $preferDist = true) : \Composer\Installer
prefer dist installation
boolean | $preferDist |
setOptimizeAutoloader(boolean $optimizeAutoloader = false) : \Composer\Installer
Whether or not generated autoloader are optimized
boolean | $optimizeAutoloader |
setClassMapAuthoritative(boolean $classMapAuthoritative = false) : \Composer\Installer
Whether or not generated autoloader considers the class map authoritative.
boolean | $classMapAuthoritative |
setApcuAutoloader(boolean $apcuAutoloader = false) : \Composer\Installer
Whether or not generated autoloader considers APCu caching.
boolean | $apcuAutoloader |
setUpdate(boolean $update = true) : \Composer\Installer
update packages
boolean | $update |
setDevMode(boolean $devMode = true) : \Composer\Installer
enables dev packages
boolean | $devMode |
setDumpAutoloader(boolean $dumpAutoloader = true) : \Composer\Installer
set whether to run autoloader or not
This is disabled implicitly when enabling dryRun
boolean | $dumpAutoloader |
setRunScripts(boolean $runScripts = true) : \Composer\Installer
set whether to run scripts or not
This is disabled implicitly when enabling dryRun
boolean | $runScripts |
setConfig(\Composer\Config $config) : \Composer\Installer
set the config instance
\Composer\Config | $config |
setVerbose(boolean $verbose = true) : \Composer\Installer
run in verbose mode
boolean | $verbose |
setIgnorePlatformRequirements(boolean $ignorePlatformReqs = false) : \Composer\Installer
set ignore Platform Package requirements
boolean | $ignorePlatformReqs |
setUpdateWhitelist(array $packages) : \Composer\Installer
restrict the update operation to a few packages, all other packages that are already installed will be kept at their current version
array | $packages |
setWhitelistTransitiveDependencies(boolean $updateTransitiveDependencies = true) : \Composer\Installer
Should dependencies of whitelisted packages (but not direct dependencies) be updated?
This will NOT whitelist any dependencies that are also directly defined in the root package.
boolean | $updateTransitiveDependencies |
None found |
setWhitelistAllDependencies(boolean $updateAllDependencies = true) : \Composer\Installer
Should all dependencies of whitelisted packages be updated recursively?
This will whitelist any dependencies of the whitelisted packages, including those defined in the root package.
boolean | $updateAllDependencies |
None found |
setPreferStable(boolean $preferStable = true) : \Composer\Installer
Should packages be preferred in a stable version when updating?
boolean | $preferStable |
None found |
setPreferLowest(boolean $preferLowest = true) : \Composer\Installer
Should packages be preferred in a lowest version when updating?
boolean | $preferLowest |
None found |
setWriteLock(boolean $writeLock = true) : \Composer\Installer
Should the lock file be updated when updating?
This is disabled implicitly when enabling dryRun
boolean | $writeLock |
None found |
setExecuteOperations(boolean $executeOperations = true) : \Composer\Installer
Should the operations (package install, update and removal) be executed on disk?
This is disabled implicitly when enabling dryRun
boolean | $executeOperations |
None found |
setSkipSuggest(boolean $skipSuggest = true) : \Composer\Installer
Should suggestions be skipped?
boolean | $skipSuggest |
None found |
disablePlugins() : \Composer\Installer
Disables plugins.
Call this if you want to ensure that third-party code never gets executed. The default is to automatically install, and execute custom third-party installers.
None found |
setSuggestedPackagesReporter(\Composer\Installer\SuggestedPackagesReporter $suggestedPackagesReporter) : \Composer\Installer
\Composer\Installer\SuggestedPackagesReporter | $suggestedPackagesReporter |
None found |
doInstall(\Composer\Repository\RepositoryInterface $localRepo, \Composer\Repository\RepositoryInterface $installedRepo, \Composer\Repository\PlatformRepository $platformRepo, array $aliases) : array
\Composer\Repository\RepositoryInterface | $localRepo | |
\Composer\Repository\RepositoryInterface | $installedRepo | |
\Composer\Repository\PlatformRepository | $platformRepo | |
array | $aliases |
[int, PackageInterfaces[]|null] with the exit code and an array of dev packages on update, or null on install
None found |
extractDevPackages(array $operations, \Composer\Repository\RepositoryInterface $localRepo, \Composer\Repository\PlatformRepository $platformRepo, array $aliases) : array
Extracts the dev packages out of the localRepo
This works by faking the operations so we can see what the dev packages would be at the end of the operation execution. This lets us then remove the dev packages from the list of operations accordingly if we are in a --no-dev install or update.
array | $operations | |
\Composer\Repository\RepositoryInterface | $localRepo | |
\Composer\Repository\PlatformRepository | $platformRepo | |
array | $aliases |
None found |
filterDevPackageOperations(array $devPackages, array $operations, \Composer\Repository\RepositoryInterface $localRepo) : array<mixed,\Composer\DependencyResolver\Operation\OperationInterface>
array | $devPackages | |
array | $operations | |
\Composer\Repository\RepositoryInterface | $localRepo |
filtered operations, dev packages are uninstalled and all operations on them ignored
None found |
movePluginsToFront(array<mixed,\Composer\DependencyResolver\Operation\OperationInterface> $operations) : array<mixed,\Composer\DependencyResolver\Operation\OperationInterface>
Workaround: if your packages depend on plugins, we must be sure that those are installed / updated first; else it would lead to packages being installed multiple times in different folders, when running Composer twice.
While this does not fix the root-causes of https://github.com/composer/composer/issues/1147, it at least fixes the symptoms and makes usage of composer possible (again) in such scenarios.
array<mixed,\Composer\DependencyResolver\Operation\OperationInterface> | $operations |
reordered operation list
None found |
moveUninstallsToFront(array<mixed,\Composer\DependencyResolver\Operation\OperationInterface> $operations) : array<mixed,\Composer\DependencyResolver\Operation\OperationInterface>
Removals of packages should be executed before installations in case two packages resolve to the same path (due to custom installers)
array<mixed,\Composer\DependencyResolver\Operation\OperationInterface> | $operations |
reordered operation list
None found |
createInstalledRepo(\Composer\Repository\RepositoryInterface $localRepo, \Composer\Repository\PlatformRepository $platformRepo) : \Composer\Repository\RepositoryInterface
\Composer\Repository\RepositoryInterface | $localRepo | |
\Composer\Repository\PlatformRepository | $platformRepo |
None found |
createPool(\Composer\Repository\RepositoryInterface|null $lockedRepository = null) : \Composer\DependencyResolver\Pool
\Composer\Repository\RepositoryInterface|null | $lockedRepository |
None found |
createPolicy() : \Composer\DependencyResolver\DefaultPolicy
None found |
createRequest(\Composer\Package\RootPackageInterface $rootPackage, \Composer\Repository\PlatformRepository $platformRepo) : \Composer\DependencyResolver\Request
\Composer\Package\RootPackageInterface | $rootPackage | |
\Composer\Repository\PlatformRepository | $platformRepo |
None found |
processDevPackages(\Composer\Repository\WritableRepositoryInterface $localRepo, \Composer\DependencyResolver\Pool $pool, \Composer\DependencyResolver\PolicyInterface $policy, array $repositories, \Composer\Repository\RepositoryInterface $installedRepo, \Composer\Repository\RepositoryInterface $lockedRepository, string $task, array|null $operations = null) : array
\Composer\Repository\WritableRepositoryInterface | $localRepo | |
\Composer\DependencyResolver\Pool | $pool | |
\Composer\DependencyResolver\PolicyInterface | $policy | |
array | $repositories | |
\Composer\Repository\RepositoryInterface | $installedRepo | |
\Composer\Repository\RepositoryInterface | $lockedRepository | |
string | $task | |
array|null | $operations |
None found |
getCurrentPackages(\Composer\Repository\RepositoryInterface $installedRepo) : array
Loads the most "current" list of packages that are installed meaning from lock ideally or from installed repo as fallback
\Composer\Repository\RepositoryInterface | $installedRepo |
None found |
None found |
processPackageUrls(\Composer\DependencyResolver\Pool $pool, \Composer\DependencyResolver\PolicyInterface $policy, \Composer\Repository\WritableRepositoryInterface $localRepo, array $repositories)
\Composer\DependencyResolver\Pool | $pool | |
\Composer\DependencyResolver\PolicyInterface | $policy | |
\Composer\Repository\WritableRepositoryInterface | $localRepo | |
array | $repositories |
None found |
updatePackageUrl(\Composer\Package\PackageInterface $package, $sourceUrl, $sourceType, $sourceReference, $distUrl)
\Composer\Package\PackageInterface | $package | |
$sourceUrl | ||
$sourceType | ||
$sourceReference | ||
$distUrl |
None found |
updateInstallReferences(\Composer\Package\PackageInterface $package, $reference)
\Composer\Package\PackageInterface | $package | |
$reference |
None found |
aliasPlatformPackages(\Composer\Repository\PlatformRepository $platformRepo, array $aliases)
\Composer\Repository\PlatformRepository | $platformRepo | |
array | $aliases |
None found |
isUpdateable(\Composer\Package\PackageInterface $package) : boolean
\Composer\Package\PackageInterface | $package |
None found |
packageNameToRegexp(string $whiteListedPattern) : string
Build a regexp from a package name, expanding * globs as required
string | $whiteListedPattern |
None found |
extractPlatformRequirements(array $links) : array
array | $links |
None found |
whitelistUpdateDependencies(\Composer\Repository\RepositoryInterface $localOrLockRepo, array $rootRequires, array $rootDevRequires)
Adds all dependencies of the update whitelist to the whitelist, too.
Packages which are listed as requirements in the root package will be skipped including their dependencies, unless they are listed in the update whitelist themselves or $whitelistAllDependencies is true.
\Composer\Repository\RepositoryInterface | $localOrLockRepo | Use the locked repo if available, otherwise installed repo will do As we want the most accurate package list to work with, and installed repo might be empty but locked repo will always be current. |
array | $rootRequires | An array of links to packages in require of the root package |
array | $rootDevRequires | An array of links to packages in require-dev of the root package |
None found |
mockLocalRepositories(\Composer\Repository\RepositoryManager $rm)
Replace local repositories with InstalledArrayRepository instances
This is to prevent any accidental modification of the existing repos on disk
\Composer\Repository\RepositoryManager | $rm |
None found |