Version Configuration
Core and module version metadata.
Version configuration lives in config/version.php. It stores metadata about the VelvetCMS core and installed modules.
Configuration Structure #
return [
'core' => [
'version' => '1.0.0',
'release_date' => '2026-01-15',
'stability' => 'stable', // stable, beta, alpha, dev
'php' => '8.4.0', // Minimum PHP version
'api_version' => '1', // API compatibility version
],
// Auto-populated from storage/modules-compiled.json
'modules' => [],
];
Core Metadata Fields #
version #
Semantic version of VelvetCMS Core (e.g., 1.0.0, 1.2.3).
release_date #
Date this version was released (YYYY-MM-DD format).
stability #
Release stability level:
| Value | Meaning |
|---|---|
stable |
Production-ready release |
beta |
Feature-complete, testing phase |
alpha |
Early development, unstable |
dev |
Development version |
php #
Minimum PHP version required to run this version of VelvetCMS.
api_version #
API compatibility version. Modules can declare which API version they require.
Module Metadata #
The modules key is populated automatically from storage/modules-compiled.json when modules are discovered. Don't edit this manually.
Each module entry includes:
'modules' => [
'Blog' => [
'version' => '1.0.0',
'api_version' => '1',
'path' => '/path/to/modules/Blog',
],
],
Accessing Version Info #
Use the version registry:
$version = app('version');
// Core version
echo $version->core(); // "1.0.0"
echo $version->coreStability(); // "stable"
// Module versions
echo $version->module('Blog'); // "1.0.0"
// Check compatibility
if ($version->apiVersion() >= 1) {
// Use v1 API features
}
CLI Commands #
# Show version info
./velvet version
# Show detailed module versions
./velvet modules:list
When to Modify #
- Never manually for most users
- Core developers update this on each release
- Module metadata is auto-generated
The version config is primarily for internal use by the framework and CLI tools.