Documentation Index
Fetch the complete documentation index at: https://docs.n3wmedia.com/llms.txt
Use this file to discover all available pages before exploring further.
Version Management
FrankPHP now includes a lightweight version management workflow designed for the way the framework is actually shipped: as a simple Zip download rather than through GitHub, Composer packages, or a deployment pipeline. This feature gives you a basic form of release management inside the framework itself. It stays true to the FrankPHP approach: no dependencies, no complex pipelines, no external release tooling. Just plain PHP scripts, a few predictable files, and a repeatable workflow you can follow every time you prepare a release.What it does
The version management feature gives you four practical things:- A single source of truth for the current version
- A structured release manifest that records what changed
- A snapshot-based diff system so future releases can be compared properly
- A clean packaging workflow for building a release Zip without leaking local-only files
This is not intended to be enterprise release engineering. It is a simple, durable release workflow for a lightweight PHP framework.
The files this feature adds
VERSION
A plain text file containing the current version number only.
Example:
CHANGELOG.md
A human-readable summary of what was added, changed, and fixed in each release.
This is the file you update for yourself, your customers, and your future documentation. It explains the release in normal language.
RELEASE_MANIFEST.json
A structured, AI-friendly release record.
This file is generated as a draft and then reviewed by hand. It is especially useful when you come back later and want to understand what changed in a release without scanning the whole codebase.
It typically includes:
versionrelease_datesummarychanges.addedchanges.changedchanges.removedroute_changesdatabase_changesbreaking_changesai_notes
tools/generate_release_manifest.php
This script creates a draft RELEASE_MANIFEST.json and stores a snapshot of the current release so the next release has something concrete to compare against.
It works by:
- reading the current version from
VERSION - scanning the project files
- comparing them with the previous release snapshot
- extracting route changes from
bootstrap.php - extracting basic schema signals from
sql/schema.sql - writing a new draft
RELEASE_MANIFEST.json - storing release snapshot data under
releases/{version}/
releases/{version}/
This folder stores the internal snapshot for each release.
It exists so FrankPHP can compare the current state of the framework against the last known release. That is what makes the generated manifest more useful over time.
This folder is for your internal release process. It should normally not be included in the customer Zip.
tools/build_release.php
This script builds a clean distributable release folder and Zip.
It creates a dist/ build using exclusion rules so local-only files such as .env, internal release snapshots, editor files, and tooling directories do not accidentally end up in the customer package.
Why this fits FrankPHP
FrankPHP is deliberately explicit. It avoids abstraction layers, hidden magic, and dependency-heavy workflows. This release system follows the same principle.- No Composer packages
- No Node tooling
- No CI/CD requirement
- No GitHub dependency
- No release SaaS
- No “pipeline” you need to understand before you can ship a Zip
- update the version
- generate the manifest
- review the outputs
- build the release Zip
How to use it
This is the workflow to follow every time you prepare a release.Step 1: Update VERSION
Open the VERSION file and change it to the new release number.
Example:
Step 2: Generate the release manifest
Run:- create or update
RELEASE_MANIFEST.json - store a snapshot under
releases/{version}/ - compare the current codebase to the previous release snapshot when one exists
First run behaviour
On the first run, there is no previous snapshot yet. That is expected. In that case, the script creates the baseline snapshot for the current version. From that point onward, future runs can compare against it.Step 3: Review RELEASE_MANIFEST.json
Do not treat the generated manifest as final. It is a draft.
You should always review and usually update:
summarybreaking_changesai_notes
changesroute_changesdatabase_changes
The machine should record the facts. You should provide the meaning.
Step 4: Update CHANGELOG.md
Add the new release entry in plain language.
This is the human-readable record of the release.
Step 5: Keep CODEBASE.md in sync
If the framework conventions, workflow, or release process changed, update CODEBASE.md so future AI pair-coding sessions have an accurate framework-level reference.
This is particularly useful when the change is architectural rather than just functional.
Step 6: Build the release Zip
Run:dist/ and then builds the Zip.
Typical output:
.envreleases/tools/- editor junk files
- temporary logs or caches
Step 7: Inspect the built Zip
Before uploading to Gumroad, confirm the Zip contains what you expect. At minimum, check that it includes the framework itself plus your release metadata files:VERSIONCHANGELOG.mdCODEBASE.mdRELEASE_MANIFEST.json
If the Zip contains only release-safe files and no local credentials, the build is ready to upload.
What to update by hand
The generated manifest reduces the chance of missing something, but there are still some fields that should be reviewed manually.Always update by hand
summarybreaking_changesai_notes
Usually just review
changesroute_changesdatabase_changes
Usually leave generated
versionrelease_dateprevious_versiongenerator
Recommended release workflow
If you will forget this later, follow this exact order:- Change
VERSION - Run
php tools/generate_release_manifest.php - Review and edit
RELEASE_MANIFEST.json - Update
CHANGELOG.md - Update
CODEBASE.mdif framework conventions changed - Run
php tools/build_release.php - Inspect
dist/{product}-{version}.zip - Upload the Zip to Gumroad
Final reminder
This feature is meant to make releases more reliable, not more complicated. If you stick to the workflow above, FrankPHP gives you a simple built-in release process with:- a real version number
- a record of what changed
- basic release history
- a clean packaging step