Publishing and Versioning Guide
This guide describes the process for releasing a new official version of the Alxarafe framework and making it available on Packagist.
1. Semantic Versioning
The project follows the Semantic Versioning 2.0.0 standard. The version format is MAJOR.MINOR.PATCH (e.g., 1.0.2).
- MAJOR (1.x.x): Incompatible API changes (Breaking Changes).
- MINOR (x.1.x): New functionalities that are backward compatible.
- PATCH (x.x.1): Backward compatible bug fixes.
2. Publishing Process
Once the code in the main branch is ready, tested, and committed, follow these steps to publish:
Step 1: Create the Tag
Git uses tags to mark specific points in history as versions.
# Create the tag locally (e.g. v1.0.1)
git tag v1.0.1 -m "Brief description of the version (e.g. Bug fix in Router)"Step 2: Push the Tag to GitHub
Tags are not pushed with a normal git push. You must push them explicitly:
# Push a specific tag
git push origin v1.0.1
# Or push all local tags (with care)
git push origin --tags3. Update on Packagist
Automatic (Recommended)
If you have configured the GitHub Webhook in your Packagist account (see repo configuration), Packagist will automatically detect the new tag as soon as you push and publish the version within minutes.
Manual
If you don't have the webhook configured or need to force the update immediately:
- Go to Packagist.org.
- Go to your package page: alxarafe/alxarafe.
- Click the green "Update" button on the right.
- Packagist will scan GitHub and find the new version
v1.0.1.
4. Verification
To confirm that the version is available, you can run in any local project:
composer show alxarafe/alxarafe --allYou should see the new version in the versions list.
Public demo deployment and reset (ALX-DEMO-001)
Path constants are absolute and independent of the working directory: BASE_PATH is the public document root, APP_PATH is the application root, and ALX_PATH is the framework root. Relative registered module paths resolve against APP_PATH; absolute registered paths remain supported. Framework modules resolve from ALX_PATH/src/Modules, with application controllers taking precedence.
Development uses skeleton/public as document root. Hostinger maps that directory to public_html beside skeleton; application modules and configuration stay in skeleton/Modules and skeleton/config. Composer runs in the repository root, where the unchanged PSR-4 paths still reference skeleton/Modules and src/Modules. The workflow installs locked dependencies, excludes runtime data and compiled caches from artifacts, preserves remote configuration, uploads and var data, and explicitly recreates skeleton/var/cache/blade after installation. The PHP worker must be able to write APP_PATH/var/cache; deployment applies mode 775, which also requires a suitable owner/group and umask on the server.
Run php skeleton/bin/reset_demo_data.php only on a demo installation configured with demo.enabled: true. It clears Agenda demo records and restores the five accounts admin, user, tester, gestor, auditor, all with password password. Existing role assignments and preferences are retained; admin status is restored only for admin. Missing accounts use the original seeder defaults (no assigned role). Unrelated users are retained. Account restoration is transactional and repeatable; conflicting names cause an explicit failure. The generic seeder still runs only for empty tables. Both reset entry points reject non-demo configurations before database mutation; the separate src/Scripts/reset_demo.php remains a full database rebuild, not the periodic Agenda/account reset. Failures return a nonzero exit code. Agenda truncation is not transactional on MySQL: resolve failures and rerun the reset.
A schema-less demo database is initialized through the existing migrations before resetting data. The MySQL lifecycle regression can be run with docker exec -e ALX_DEMO_TEST_HOST=alxarafe_db -w /var/www/html alxarafe_php php vendor/bin/phpunit; it creates and drops a uniquely named test database and never uses the configured application database. CI sets this host to its MySQL service.