ComposerSelfUpdateScopeResolver
Detects Composer global DevTools installations from known Composer home paths.
Interfaces
Resolves whether self-update SHOULD target the local project or Composer global project.
Constants
Properties
Methods
Returns whether DevTools is running from Composer's global installation.
Returns candidate Composer home directories for supported platforms.
Safely canonicalizes a path, resolving symlinks when available.
private
EnvironmentInterface
$environment
private
string|null
$packagePath
=
null
public
__construct(EnvironmentInterface
$environment[,
string|null
$packagePath = null]) : mixed
Parameters
Description
reads Composer home environment values
$packagePath
:
string|null
=
null
Description
the DevTools package path; defaults to the active package root
Returns whether DevTools is running from Composer's global installation.
public
isGlobalInstallation() : bool
Return values
Returns candidate Composer home directories for supported platforms.
private
getComposerHomeCandidates() : array<int, string>
Return values
Safely canonicalizes a path, resolving symlinks when available.
private
normalizePath(
string
$path) : string
Parameters
$path
:
string