FlowPackageKey
final class FlowPackageKey (View source)
| internal | Only meant to be used only inside the Flow package management code. Should NOT leak into public APIs. |
(Legacy) Flow representation of a package key.
With the rise of composer each package has a key like "vendor/foo-bar". But before the adaption Flow already established the package keys like "Vendor.Foo.Bar", which is represented and validated by this value object.
The Flow package keys are currently inferred from the composer manifest {\Neos\Flow\Package\FlowPackageKey::deriveFromManifestOrPath()}, and can also be tried to be reverse calculated: {[\Neos\Flow\Package\FlowPackageKey::deriveComposerPackageName()}
The](../../../Neos/Flow/Package/FlowPackageKey.html) idea around the Flow package key is obsolete since composer and will eventually be replaced. Still major parts of Flow depend on the concept.
Constants
| PATTERN |
|
Methods
No description
Check the conformance of the given package key
Resolves package key from Composer manifest
Determines the composer package name ("vendor/foo-bar") from the Flow package key ("Vendor.Foo.Bar")
Details
static
fromString(string $value)
No description
static bool
isPackageKeyValid(string $string)
| internal | please use {@see \Neos\Flow\Package\PackageManager::isPackageKeyValid()} |
Check the conformance of the given package key
static FlowPackageKey
deriveFromManifestOrPath(array $manifest, string $packagePath)
Resolves package key from Composer manifest
If it is a Flow package the name of the containing directory will be used.
Else if the composer name of the package matches the first part of the lowercased namespace of the package, the mixed case version of the composer name / namespace will be used, with backslashes replaced by dots.
Else the composer name will be used with the slash replaced by a dot
string
deriveComposerPackageName()
Determines the composer package name ("vendor/foo-bar") from the Flow package key ("Vendor.Foo.Bar")
WARNING: This is NOT necessary the reverse calculation when the package key was inferred via {\Neos\Flow\Package\self::deriveFromManifestOrPath()} For example vendor/foo-bar will become vendor.foobar which in turn will be converted via this method to vendor/foobar