class ComposerUtility (View source)

internal  Only meant to be used only inside the Flow package management code.
 

Utility to access composer information like composer manifests (composer.json) and the lock file.

Properties

static protected array $composerManifestCache

Runtime cache for composer.json data

static protected array $composerLockCache

Runtime cache for composer.lock data

Methods

static array|mixed
getComposerManifest(string $manifestPath, string $configurationPath = null)

Returns contents of Composer manifest - or part there of.

static array
readComposerLock()

Read the content of the composer.lock

static array
readComposerManifest(string $manifestPath)

Read the content of composer.json in the given path

static bool
isFlowPackageType(string $packageType)

Checks if the given (composer) package type is a type native to the neos project.

static array
writeComposerManifest(string $manifestPath, FlowPackageKey $packageKey, array $composerManifestData = [])

Write a composer manifest for the package.

static string
getPackageVersion(string $composerName)

Get the package version of the given package Return normalized package version.

static void
flushCaches()

Flushes the internal caches for manifest files and composer lock.

Details

static array|mixed getComposerManifest(string $manifestPath, string $configurationPath = null)

Returns contents of Composer manifest - or part there of.

Parameters

string $manifestPath
string $configurationPath

Optional. Only return the part of the manifest indexed by configurationPath

Return Value

array|mixed

static array readComposerLock()

Read the content of the composer.lock

Return Value

array

static protected array readComposerManifest(string $manifestPath)

Read the content of composer.json in the given path

Parameters

string $manifestPath

Return Value

array

Exceptions

MissingPackageManifestException

static bool isFlowPackageType(string $packageType)

Checks if the given (composer) package type is a type native to the neos project.

Parameters

string $packageType

Return Value

bool

static array writeComposerManifest(string $manifestPath, FlowPackageKey $packageKey, array $composerManifestData = [])

Write a composer manifest for the package.

Parameters

string $manifestPath
FlowPackageKey $packageKey
array $composerManifestData

Return Value

array

the manifest data written

static string getPackageVersion(string $composerName)

Get the package version of the given package Return normalized package version.

Parameters

string $composerName

Return Value

string

See also

https://getcomposer.org/doc/04-schema.md#version

static void flushCaches()

Flushes the internal caches for manifest files and composer lock.

Return Value

void