Appearance
Planner
php
final class Zairakai\LaravelDevTools\Update\PlannerThe decisions of the automatic update, without any side effect: versions, changes of the manifest, tag to create.
Source: src/Update/Planner.php
Constants
| Name | Value | Description |
|---|---|---|
ALL_SECTIONS | ['require', 'require-dev'] | All the sections of composer.json that hold requirements. |
RUNTIME_SECTIONS | ['require'] | The sections of composer.json that are published with the package. |
Methods
config()
php
public static function config(array $user = []): arrayThe configuration of a project, completed with the defaults.
Returns array{reject: list<string>, cooldown: string, tag: array{when: string, level: string}, cascade: ?array{groups: list<string>}}
diffDependencies()
php
public static function diffDependencies(array $before, array $after, array $sections = self::ALL_SECTIONS): arrayThe requirements whose range changed, with the section, the old range and the new one.
Returns list<array{section: string, name: string, from: ?string, to: ?string}>
formatChanges()
php
public static function formatChanges(array $rows): stringThe changes as a Markdown table, for the merge request and the commit.
latestTag()
php
public static function latestTag(array $tags): stringThe highest tag of the form X.Y.Z (a tag with a prefix or a suffix is ignored), or null.
nextVersion()
php
public static function nextVersion(string $last, string $level): stringThe version after $last for a level of change (major, minor or patch).
planTag()
php
public static function planTag(array $config, string $last, array $commits, array $before, array $after): arrayWhat tag has to do: the version to create (or null) and why.
Returns array{version: ?string, reason: string}
runtimeChanged()
php
public static function runtimeChanged(array $before, array $after, array $sections = self::RUNTIME_SECTIONS): boolTrue when a range that is published is not the same.
signerIdentity()
php
public static function signerIdentity(array $env): arrayThe identity and the key used to sign, from the group variables. It fails when one is missing: no unsigned tag.
Returns array{name: string, email: string, key: string}