Appearance
Manifest
php
final class Zairakai\LaravelDevTools\Update\ManifestThe changes of composer.json and of the lock file: what changed, what is published with the package.
Source: src/Update/Manifest.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
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.
isRefOnlyChange()
php
public static function isRefOnlyChange(string $diff): boolTrue when a diff changes one ref: line and nothing else. The install of the tools moves the ref: of the shared pipeline to the installed version: that is the only change of the pipeline file an update may commit.
lockVersions()
php
public static function lockVersions(array $lock): arrayThe locked version of every package of a composer.lock, by name.
Returns array<string, 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.
syncDependabot()
php
public static function syncDependabot(string $text, array $names, string $ecosystem): stringThe text of dependabot.yml with the block of the ecosystem rewritten: between # BEGIN dependency-policy (composer) and # END dependency-policy (composer), one ignore rule per package of the policy (nothing when none). Null without markers.