ComposerSelfUpdateScopeResolver

Class
Read only: Yes Final: Yes

Detects Composer global DevTools installations from known Composer home paths.

Table of Contents

Interfaces

SelfUpdateScopeResolverInterface

Resolves whether self-update SHOULD target the local project or Composer global project.

Constants

 = 'vendor/fast-forward/dev-tools'

Properties

Methods

 : mixed
isGlobalInstallation()

Returns whether DevTools is running from Composer's global installation.

 : bool
getComposerHomeCandidates()

Returns candidate Composer home directories for supported platforms.

 : array<int, string>
normalizePath()

Safely canonicalizes a path, resolving symlinks when available.

 : string
Constants

Constants

Properties
Methods

__construct()

Public
public __construct(EnvironmentInterface  $environment[, string|null  $packagePath = null]) : mixed
Parameters
$environment : EnvironmentInterface

Description

reads Composer home environment values

$packagePath : string|null = null

Description

the DevTools package path; defaults to the active package root

isGlobalInstallation()

Public

Returns whether DevTools is running from Composer's global installation.

public isGlobalInstallation() : bool
Return values
bool

getComposerHomeCandidates()

Private

Returns candidate Composer home directories for supported platforms.

private getComposerHomeCandidates() : array<int, string>
Return values
array<int, string>

normalizePath()

Private

Safely canonicalizes a path, resolving symlinks when available.

private normalizePath( string  $path) : string
Parameters
$path : string
Return values
string