PHP Class Neos\Flow\Composer\ComposerUtility

Meant to be used only inside the Flow package management code.
显示文件 Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$composerLockCache array Runtime cache for composer.lock data
$composerManifestCache array Runtime cache for composer.json data

Public Methods

Method Description
flushCaches ( ) : void Flushes the internal caches for manifest files and composer lock.
getComposerManifest ( string $manifestPath, string $configurationPath = null ) : array | mixed Returns contents of Composer manifest - or part there of.
getComposerPackageNameFromPackageKey ( string $packageKey ) : string Determines the composer package name ("vendor/foo-bar") from the Flow package key ("Vendor.Foo.Bar")
isFlowPackageType ( string $packageType ) : boolean Checks if the given (composer) package type is a type native to the neos project.
readComposerLock ( ) : array Read the content of the composer.lock
writeComposerManifest ( string $manifestPath, string $packageKey, array $composerManifestData = [] ) : array Write a composer manifest for the package.

Protected Methods

Method Description
readComposerManifest ( string $manifestPath ) : array Read the content of composer.json in the given path

Method Details

flushCaches() public static method

Flushes the internal caches for manifest files and composer lock.
public static flushCaches ( ) : void
return void

getComposerManifest() public static method

Returns contents of Composer manifest - or part there of.
public static getComposerManifest ( string $manifestPath, string $configurationPath = null ) : array | mixed
$manifestPath string
$configurationPath string Optional. Only return the part of the manifest indexed by configurationPath
return array | mixed

getComposerPackageNameFromPackageKey() public static method

Determines the composer package name ("vendor/foo-bar") from the Flow package key ("Vendor.Foo.Bar")
public static getComposerPackageNameFromPackageKey ( string $packageKey ) : string
$packageKey string
return string

isFlowPackageType() public static method

Checks if the given (composer) package type is a type native to the neos project.
public static isFlowPackageType ( string $packageType ) : boolean
$packageType string
return boolean

readComposerLock() public static method

Read the content of the composer.lock
public static readComposerLock ( ) : array
return array

readComposerManifest() protected static method

Read the content of composer.json in the given path
protected static readComposerManifest ( string $manifestPath ) : array
$manifestPath string
return array

writeComposerManifest() public static method

Write a composer manifest for the package.
public static writeComposerManifest ( string $manifestPath, string $packageKey, array $composerManifestData = [] ) : array
$manifestPath string
$packageKey string
$composerManifestData array
return array the manifest data written

Property Details

$composerLockCache protected_oe static_oe property

Runtime cache for composer.lock data
protected static array $composerLockCache
return array

$composerManifestCache protected_oe static_oe property

Runtime cache for composer.json data
protected static array $composerManifestCache
return array