Description
Installing a PHP version can be time-consuming, and in many cases it is not necessary to always use the latest available patch version. For example, if PHP 8.4.19 is already installed locally, it may be preferable to use that instead of downloading and building 8.4.20.
An offline mode could allow skipping online version checks entirely and prefer already installed local versions.
Expected Behavior
With an offline flag enabled:
# Uses already installed 8.4.19 instead of fetching 8.4.20
OFFLINE=1 mise use -g php@8.4
# Default behavior (downloads latest available version)
OFFLINE=0 mise use -g php@8.4
Edge Case
If no matching version is available locally in offline mode:
- The command should fail
- The user must retry without offline mode to install the version
Optional Improvement
Introduce a global interactive setting:
When a newer version is available online, but a compatible version is already installed locally:
-
Prompt the user:
New version available: 8.4.20
Installed version found: 8.4.19
Which one do you want to use?
This would improve UX by avoiding unnecessary rebuilds while still allowing upgrades when desired.
Motivation
- Avoid unnecessary downloads and compilation
- Speed up workflows (especially in CI, containers, or limited environments)
- Improve developer experience when working with already installed versions
Description
Installing a PHP version can be time-consuming, and in many cases it is not necessary to always use the latest available patch version. For example, if PHP 8.4.19 is already installed locally, it may be preferable to use that instead of downloading and building 8.4.20.
An offline mode could allow skipping online version checks entirely and prefer already installed local versions.
Expected Behavior
With an offline flag enabled:
When
OFFLINE=1:When
OFFLINE=0(default):Edge Case
If no matching version is available locally in offline mode:
Optional Improvement
Introduce a global interactive setting:
When a newer version is available online, but a compatible version is already installed locally:
Prompt the user:
This would improve UX by avoiding unnecessary rebuilds while still allowing upgrades when desired.
Motivation