PHP Class Wikimedia\Composer\Merge\PluginState

Author: Bryan Davis ([email protected])
Afficher le fichier Open project: wikimedia/composer-merge-plugin Class Usage Examples

Protected Properties

Свойство Type Description
$composer Composer\Composer
$devMode boolean
$dumpAutoloader boolean
$duplicateLinks array
$firstInstall boolean
$includes array
$locked boolean
$mergeDev boolean Whether to merge the -dev sections.
$mergeExtra boolean By default, the extra section is not merged and there will be many cases where the merge of the extra section is performed too late to be of use to other plugins. When enabled, merging uses one of two strategies - either 'first wins' or 'last wins'. When enabled, 'first wins' is the default behaviour. If Replace mode is activated then 'last wins' is used.
$mergeExtraDeep boolean By default the extra section is merged with array_merge() and duplicate keys are ignored. When enabled this allows to merge the arrays recursively using the following rule: Integer keys are merged, while array values are replaced where the later values overwrite the former. This is useful especially for the extra section when plugins use larger structures like a 'patches' key with the packages as sub-keys and the patches as values. When 'replace' mode is activated the order of array merges is exchanged.
$optimizeAutoloader boolean
$recurse boolean
$replace boolean
$requires array

Méthodes publiques

Méthode Description
__construct ( Composer\Composer $composer )
addDuplicateLinks ( string $type, array $packages ) Add duplicate packages
forceUpdate ( ) : true Should an update be forced?
getDuplicateLinks ( string $type ) : array Get duplicate packages
getIncludes ( ) : array Get list of filenames and/or glob patterns to include
getRequires ( ) : array Get list of filenames and/or glob patterns to require
isDevMode ( ) : boolean Should devMode settings be processed?
isFirstInstall ( ) : boolean Is this the first time that the plugin has been installed?
isLocked ( ) : boolean Was a lockfile present when the plugin was installed?
loadSettings ( ) Load plugin settings
recurseIncludes ( ) : boolean Should includes be recursively processed?
replaceDuplicateLinks ( ) : boolean Should duplicate links be replaced in a 'last definition wins' order?
setDevMode ( boolean $flag ) Set the devMode flag
setDumpAutoloader ( boolean $flag ) Set the dumpAutoloader flag
setFirstInstall ( boolean $flag ) Set the first install flag
setLocked ( boolean $flag ) Set the locked flag
setOptimizeAutoloader ( boolean $flag ) Set the optimizeAutoloader flag
shouldDumpAutoloader ( ) : boolean Is the autoloader file supposed to be written out?
shouldMergeDev ( ) : boolean Should devMode settings be merged?
shouldMergeExtra ( ) : boolean Should the extra section be merged?
shouldMergeExtraDeep ( ) : boolean Should the extra section be merged deep / recursively?
shouldOptimizeAutoloader ( ) : boolean Should the autoloader be optimized?

Method Details

__construct() public méthode

public __construct ( Composer\Composer $composer )
$composer Composer\Composer

forceUpdate() public méthode

Should an update be forced?
public forceUpdate ( ) : true
Résultat true If packages are not locked

getIncludes() public méthode

Get list of filenames and/or glob patterns to include
public getIncludes ( ) : array
Résultat array

getRequires() public méthode

Get list of filenames and/or glob patterns to require
public getRequires ( ) : array
Résultat array

isDevMode() public méthode

Should devMode settings be processed?
public isDevMode ( ) : boolean
Résultat boolean

isFirstInstall() public méthode

Is this the first time that the plugin has been installed?
public isFirstInstall ( ) : boolean
Résultat boolean

isLocked() public méthode

Was a lockfile present when the plugin was installed?
public isLocked ( ) : boolean
Résultat boolean

loadSettings() public méthode

Load plugin settings
public loadSettings ( )

recurseIncludes() public méthode

Should includes be recursively processed?
public recurseIncludes ( ) : boolean
Résultat boolean

setDevMode() public méthode

Set the devMode flag
public setDevMode ( boolean $flag )
$flag boolean

setDumpAutoloader() public méthode

Set the dumpAutoloader flag
public setDumpAutoloader ( boolean $flag )
$flag boolean

setFirstInstall() public méthode

Set the first install flag
public setFirstInstall ( boolean $flag )
$flag boolean

setLocked() public méthode

Set the locked flag
public setLocked ( boolean $flag )
$flag boolean

setOptimizeAutoloader() public méthode

Set the optimizeAutoloader flag
public setOptimizeAutoloader ( boolean $flag )
$flag boolean

shouldDumpAutoloader() public méthode

Is the autoloader file supposed to be written out?
public shouldDumpAutoloader ( ) : boolean
Résultat boolean

shouldMergeDev() public méthode

Should devMode settings be merged?
public shouldMergeDev ( ) : boolean
Résultat boolean

shouldMergeExtra() public méthode

By default, the extra section is not merged and there will be many cases where the merge of the extra section is performed too late to be of use to other plugins. When enabled, merging uses one of two strategies - either 'first wins' or 'last wins'. When enabled, 'first wins' is the default behaviour. If Replace mode is activated then 'last wins' is used.
public shouldMergeExtra ( ) : boolean
Résultat boolean

shouldMergeExtraDeep() public méthode

By default the extra section is merged with array_merge() and duplicate keys are ignored. When enabled this allows to merge the arrays recursively using the following rule: Integer keys are merged, while array values are replaced where the later values overwrite the former. This is useful especially for the extra section when plugins use larger structures like a 'patches' key with the packages as sub-keys and the patches as values. When 'replace' mode is activated the order of array merges is exchanged.
public shouldMergeExtraDeep ( ) : boolean
Résultat boolean

shouldOptimizeAutoloader() public méthode

Should the autoloader be optimized?
public shouldOptimizeAutoloader ( ) : boolean
Résultat boolean

Property Details

$composer protected_oe property

protected Composer,Composer $composer
Résultat Composer\Composer

$devMode protected_oe property

protected bool $devMode
Résultat boolean

$dumpAutoloader protected_oe property

protected bool $dumpAutoloader
Résultat boolean

$firstInstall protected_oe property

protected bool $firstInstall
Résultat boolean

$includes protected_oe property

protected array $includes
Résultat array

$locked protected_oe property

protected bool $locked
Résultat boolean

$mergeDev protected_oe property

Whether to merge the -dev sections.
protected bool $mergeDev
Résultat boolean

$mergeExtra protected_oe property

By default, the extra section is not merged and there will be many cases where the merge of the extra section is performed too late to be of use to other plugins. When enabled, merging uses one of two strategies - either 'first wins' or 'last wins'. When enabled, 'first wins' is the default behaviour. If Replace mode is activated then 'last wins' is used.
protected bool $mergeExtra
Résultat boolean

$mergeExtraDeep protected_oe property

By default the extra section is merged with array_merge() and duplicate keys are ignored. When enabled this allows to merge the arrays recursively using the following rule: Integer keys are merged, while array values are replaced where the later values overwrite the former. This is useful especially for the extra section when plugins use larger structures like a 'patches' key with the packages as sub-keys and the patches as values. When 'replace' mode is activated the order of array merges is exchanged.
protected bool $mergeExtraDeep
Résultat boolean

$optimizeAutoloader protected_oe property

protected bool $optimizeAutoloader
Résultat boolean

$recurse protected_oe property

protected bool $recurse
Résultat boolean

$replace protected_oe property

protected bool $replace
Résultat boolean

$requires protected_oe property

protected array $requires
Résultat array