patchmgr.php
Table of Contents
Classes
Constants
- CDN_PREFIX = 'https://download.civicrm.org/patches'
- COMPOSER_FILE = \PROJECT_DIR . '/composer.json'
- DIST_DIR = \PROJECT_DIR . '/tools/patches/dist'
- PROJECT_DIR = \dirname(__DIR__, 3)
- RAW_DIR = \PROJECT_DIR . '/tools/patches/raw'
Functions
- main() : mixed
- help() : string
- Generate help text
- useLocal() : void
- Update `composer.json` with a list of local patch-files.
- createRemotePatchList() : array<string|int, mixed>
- useRemote() : void
- Update `composer.json` with a list of remote patch-URLs.
- validate() : void
- Assert that `composer.json` has the right list of remote patch-URLs.
- build() : void
- Find all files in 'tools/patches/raw/'. Copy them to 'tools/patches/dist/'.
- readComposer() : mixed
- writeComposer() : mixed
- sortPatches() : void
- scanRawPatches() : array<string|int, mixed>
- Get a list of all the patch-files in ./tools/patches/raw.
Constants
CDN_PREFIX
public
mixed
CDN_PREFIX
= 'https://download.civicrm.org/patches'
COMPOSER_FILE
public
mixed
COMPOSER_FILE
= \PROJECT_DIR . '/composer.json'
DIST_DIR
public
mixed
DIST_DIR
= \PROJECT_DIR . '/tools/patches/dist'
PROJECT_DIR
public
mixed
PROJECT_DIR
= \dirname(__DIR__, 3)
RAW_DIR
public
mixed
RAW_DIR
= \PROJECT_DIR . '/tools/patches/raw'
Functions
main()
main(mixed $argv) : mixed
Parameters
- $argv : mixed
help()
Generate help text
help() : string
Return values
string —Full help text
useLocal()
Update `composer.json` with a list of local patch-files.
useLocal() : void
createRemotePatchList()
createRemotePatchList() : array<string|int, mixed>
Return values
array<string|int, mixed>useRemote()
Update `composer.json` with a list of remote patch-URLs.
useRemote() : void
validate()
Assert that `composer.json` has the right list of remote patch-URLs.
validate() : void
build()
Find all files in 'tools/patches/raw/'. Copy them to 'tools/patches/dist/'.
build() : void
readComposer()
readComposer() : mixed
writeComposer()
writeComposer(mixed $data) : mixed
Parameters
- $data : mixed
sortPatches()
sortPatches(array<string|int, mixed> &$patches) : void
Parameters
- $patches : array<string|int, mixed>
scanRawPatches()
Get a list of all the patch-files in ./tools/patches/raw.
scanRawPatches() : array<string|int, mixed>