Skip to content
PHP Ecosystem
Explore

ProviderPackage

API reference › Scaffold › Config › ProviderPackage

final readonly classPHPForge\Scaffold\Config\ProviderPackage
Sourcesrc/Config/ProviderPackage.php

Represents an installed provider package as the scaffold core sees it, independent of Composer’s package classes.

PropertyTypeDescriptionDefined by
$extra readonly constructormixed[]|nullextra section of the package, or null to read it from the composer.json at $installPath. Default: null.ProviderPackage
$installPath readonly constructorstring|nullAbsolute install path, or null for a package without files, such as a metapackage.ProviderPackage
$name readonly constructorstringComposer package name.ProviderPackage
$prettyVersion readonly constructorstringInstalled version recorded in scaffold-lock.json.ProviderPackage
MethodDescriptionDefined by
__construct()Creates an installed provider descriptor.ProviderPackage
public function __construct(string $name, string $prettyVersion, string|null $installPath, mixed[]|null $extra = null)

Creates an installed provider descriptor.

Parameters

ParameterTypeDescription
$namestringComposer package name.
$prettyVersionstringInstalled version recorded in scaffold-lock.json.
$installPathstring|nullAbsolute install path, or null for a package without files, such as a metapackage.
$extramixed[]|nullextra section of the package, or null to read it from the composer.json at $installPath.