Skip to content
Corex

VersionPlan

Corex\Cli\Release\VersionPlan · class · CLI layer

Computes how to stamp a target version across the framework — purely. Given a valid semver and a map of path => contents, it rewrites three things in each file: the first header Version: line (plugin/theme headers), every COREX_*_VERSION constant, and the documentation site’s exported CURRENT_VERSION. It returns only the files whose contents actually change, so applying the plan is idempotent and a dry-run is exact. The CLI VersionCommand reads the files, calls {@see plan()}, and writes (or previews) the results.

A semver x.y.z, optionally with a -prerelease and/or +build suffix.

plan(string $version, array $files): array

Section titled “plan(string $version, array $files): array”