PHP Class GrumPHP\Util\Composer

Show file Open project: phpro/grumphp Class Usage Examples

Public Methods

Method Description
ensureProjectBinDirInSystemPath ( string $binDir ) Composer contains some logic to prepend the current bin dir to the system PATH.
loadConfiguration ( ) : Composer\Config
loadRootPackageFromJson ( string | Composer\Json\JsonFile $json, Composer\Config $config = null ) : Composer\Package\RootPackageInterface

Method Details

ensureProjectBinDirInSystemPath() public static method

To make sure this application works the same in CLI and Composer modus, we'll have to ensure that the bin path is always prefixed.
public static ensureProjectBinDirInSystemPath ( string $binDir )
$binDir string

loadConfiguration() public static method

public static loadConfiguration ( ) : Composer\Config
return Composer\Config

loadRootPackageFromJson() public static method

public static loadRootPackageFromJson ( string | Composer\Json\JsonFile $json, Composer\Config $config = null ) : Composer\Package\RootPackageInterface
$json string | Composer\Json\JsonFile
$config Composer\Config
return Composer\Package\RootPackageInterface