mirror of
https://github.com/getgrav/grav.git
synced 2026-05-24 05:21:08 +02:00
Part of the 1.7/1.8 → 2.0 migration path (see the Grav 2.0 blog plan). system/migrate/migrate.php (new): single-file standalone wizard extracted to a 1.x webroot by the grav-plugin-migrate-to-2 kickoff. Uses only PHP stdlib — no 1.x or 2.0 classes are loaded. Auths against user/accounts/*.yaml (bcrypt, super-admin required), runs preflight, snapshots user/, extracts the staged 2.0 zip, imports content, evaluates plugins against blueprint + getgrav.org curated compatibility, installs decisions, runs a health check, and promotes the stage into webroot. Common/GPM/Local/Package::inferCompatibility(): grav >= 2.0 dependencies now resolve to ['2.0']. IndexCommand/InfoCommand/UpdateCommand gain a magenta '2.0' badge alongside the existing 1.7/1.8 badges. Installer/Install.php: restores the preflight machinery that was collateral-damaged by the safe-upgrade removal. generatePreflightReport, allowPendingPackageOverride, allowIncompatibleOverride, and the detection helpers (detectPendingPackageUpdates, detectIncompatiblePackages, detectPsrLogConflicts, detectMonologConflicts, readBlueprintCompatibility, inferCompatibleVersions) are ported back so SelfupgradeCommand's 1.7→2.0 gate actually runs. inferCompatibleVersions extended to emit ['2.0'] for grav >= 2.0 dependencies. Safe-upgrade backcompat stubs (forceSafeUpgrade, getLastManifest) untouched.