Skip to content

feat: Simplify package scope and add database versioning support#19

Merged
Williamug merged 23 commits intomainfrom
dev
Feb 18, 2026
Merged

feat: Simplify package scope and add database versioning support#19
Williamug merged 23 commits intomainfrom
dev

Conversation

@Williamug
Copy link
Owner

feat: Simplify package scope and add database versioning support

Summary

This major update refocuses the Versioning package on its primary use cases: Laravel and vanilla PHP applications.

Multi-framework support has been removed to reduce complexity and improve maintainability. In its place, this release introduces robust database-backed version storage, designed specifically for FTP deployment environments where .git metadata is unavailable.


Removed Multi-Framework Support

To simplify the package architecture and long-term maintenance:

  • Removed UniversalVersioning class
  • Deleted framework integration examples:
    • Symfony
    • CodeIgniter
    • CakePHP
    • Slim
  • Removed related tests
  • Removed framework integration documentation
  • Officially narrowed scope to:
    • Laravel
    • Standalone (vanilla PHP)

Added Database Versioning Support

Core Additions

  • AppVersion Model
    • Eloquent model for storing version metadata
  • Migration System
    • app_versions database table
  • Auto-Sync Middleware
    • Automatically syncs version from file to database
  • Console Commands
    • Manual version storage & sync commands
  • Configuration Options
    • Toggle database storage
    • Control auto-sync behavior

Enhanced Core Features

  • Versioning Class
    • Added database-first version detection strategy
    • New fallback chain:
      Database → File → Git → Fallback version
      
  • Service Provider
    • Integrated middleware and database components
  • Configuration
    • Added database storage options
  • Composer
    • Updated package description and keywords

Updated Documentation

  • README
    • Simplified to focus on Laravel and vanilla PHP usage
  • Vanilla PHP Guide
    • Improved standalone usage instructions
  • Database Versioning Guide
    • Detailed instructions for FTP deployment scenarios

Motivation

The package previously supported 8+ PHP frameworks, which:

  • Increased maintenance complexity
  • Added architectural overhead
  • Diluted focus from primary use cases

This update:

  • Simplifies the codebase
  • Improves maintainability
  • Focuses on real-world usage
  • Adds critical support for FTP-based deployments

Database Storage Benefits

  • ✅ Works in FTP deployments without .git
  • ✅ Automatically syncs from version.txt
  • ✅ Reliable fallback detection chain

Breaking Changes

  • UniversalVersioning class removed
    → Use LaravelVersioning or StandaloneVersioning

  • Framework-specific integrations removed
    → Documentation now focuses on Laravel and vanilla PHP only

  • Multi-framework support discontinued

Migration Steps

For existing users:

  1. Replace UniversalVersioning usage with:
    • LaravelVersioning, or
    • StandaloneVersioning
  2. (Optional) Enable database storage in configuration
  3. Run migrations to create the app_versions table

Updated the main README file with improved documentation and usage instructions.
Improved the vanilla PHP usage guide with clearer examples and removed framework-specific references.
Updated the test report with latest test results and coverage information.
Updated package dependencies and configuration for improved compatibility.
Improved configuration options and added new settings for better customization.
Added database storage functionality for FTP deployments and improved version detection logic.
Added database model registration and migration publishing for version storage.
Removed outdated framework integration guide as the package now focuses on Laravel and vanilla PHP only.
Removed the decision guide as the package structure has been simplified.
Removed outdated migration stub file that is no longer needed.
Removed CakePHP integration example as framework support has been simplified.
Removed CodeIgniter integration example as framework support has been simplified.
Removed Slim integration example as framework support has been simplified.
Removed Symfony integration example as framework support has been simplified.
Removed the UniversalVersioning class as the package now focuses on Laravel and vanilla PHP implementations.
Removed test file for the deprecated UniversalVersioning class.
Added comprehensive documentation for database-based version storage feature.
Added migration for storing version information in database for FTP deployments.
Added console commands for managing version storage in database.
Added middleware for automatically syncing version from file to database.
Added Eloquent model for managing version information in database.
@Williamug Williamug merged commit fcb926c into main Feb 18, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant