Docs LATEST

Version Configuration

Core and module version metadata.

Configuration

Version configuration lives in config/version.php. It stores metadata about the VelvetCMS core and installed modules.

Configuration Structure #

return [
    'core' => [
        'version' => '2.4.0',
        'release_date' => '2026-05-12',
        'stability' => 'stable',
        'php' => '^8.4',
    ],

    /** Auto-populated from storage/modules-compiled.json at runtime when present */
    '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.

Module Metadata #

The modules key is merged at runtime from storage/modules-compiled.json when that file exists. Don't edit merged module rows by hand. They are rebuilt when you ./velvet module:compile.

Merged entries typically include semver version, stability, optional source metadata, and requires / provides maps consumed by VelvetCMS\Core\VersionRegistry. Inspect modules-compiled.json for the exact shape in your installation.

Accessing Version Info #

Resolve VelvetCMS\Core\VersionRegistry from the container:

use VelvetCMS\Core\VersionRegistry;

$registry = app(VersionRegistry::class);

echo $registry->getVersion();              // Core semver from config
echo $registry->getStability();            // e.g. "stable"
echo $registry->getVersion('docs');       // Installed module version

if ($registry->isCompatible('docs', 'core')) {
    // Module's core constraint satisfies current Core version
}

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.