Download the PHP package mahesh-kerai/update-generator without Composer

On this page you can find all versions of the php package mahesh-kerai/update-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package update-generator

Update Generator

Latest Stable Version Total Downloads License PHP Version Require

A robust Laravel package for generating update ZIP files and new installation packages based on Git repository changes.

Features

Minimum Requirements

Requirement Version
PHP 8.1+
Laravel 9.x+
Git 2.0+

Installation

1. Install the package

System Requirements

Note: The package now uses PHP's built-in ZipArchive instead of external zip commands, making it fully compatible across all operating systems.

2. Publish configuration

This creates the configuration file at config/update-generator.php

3. Configure excluded paths and additional files

Edit config/update-generator.php to customize excluded paths and include additional files:

Usage

Modern Interactive CLI Workflow (Recommended)

The easiest way to generate packages is to use the interactive wizard, which features a modern, boxed UI inspired by Laravel's official tools. Simply run the command without any arguments:

The command will guide you through a structured, interactive process:

  1. Filtering Method: Select between Date Range or Commit Range using arrow keys.
  2. Instructional Notes: Contextual help will appear (e.g., format reminders).
  3. Conditional Inputs:
    • Date Range Mode: Enter Start Date and End Date (YYYY-MM-DD).
    • Commit Range Mode: Enter Starting Commit Reference and Ending Commit Reference (Strictly SHAs only).
  4. Current Version: Enter your system's current version (e.g., 1.0.0).
  5. Update Version: Enter the target update version (e.g., 1.1.0).
  6. Type Selection: Choose both, update, or new using the interactive radio-style selection.

Once all inputs are provided, a Confirmation Summary will be displayed inside a structured box for your final approval.

Commit Range Mode Guidelines

When using Commit Range Mode, please note the following:

[!IMPORTANT] Supported References: Only Full Git SHAs and Short Git SHAs (e.g., a1b2c3d) are supported.

Unsupported References: You cannot use full commit messages as references. Ensure the starting commit precedes the ending commit in the repository's history.

Inline Options (Backward Compatibility & Automation)

For automated systems or advanced users, you can pass parameters directly. Providing these options will automatically bypass the interactive prompts:

Date-Based Example:

Commit-Based Example:

Input Parameters Explanation

Parameter Format / Options Description
Start Date YYYY-MM-DD The beginning date to check Git history for modified or created files.
End Date YYYY-MM-DD The ending date to check Git history.
Start Commit Full/Short SHA The starting commit SHA reference (Full or Short). Commit messages not allowed.
End Commit Full/Short SHA The ending commit SHA reference. Commit messages not allowed.
Current Version e.g. 1.0.0 The current operational version of the project. Added to the generated version_info.php.
Update Version e.g. 1.1.0 The target version after the update.
Type both, update, new Defines the output. update extracts only changed files. new bundles the entire project.

How It Works (Workflow)

  1. Git Diff Analysis: If generating an update package, the system runs local Git commands to identify exactly which files were modified, created, or deleted between the provided Date Range or Commit Range.
  2. File Filtering: Identified files are cross-referenced with your exclude_update and add_update_file configuration to ensure absolute correctness.
  3. Packaging Update Files: All applicable files are replicated into a temporary environment and bundled into a source_code.zip archive.
  4. Packaging New Installation: If requested, the system zips the entire project directory, cleanly bypassing paths marked in exclude_new. Furthermore, sensitive values inside .env are automatically sanitized.
  5. Versioning Details: A version_info.php is generated containing the input versions to assist the end-user upgrade systems.

Requirements & Prerequisites

Before running the command, ensure your environment is fully prepared:

Output Structure

Depending on your selected Type, the following files and folders will be created inside the configured output directory (storage/app/update_files by default):

Update Package

Generates only changed and new files:

New Installation Package

Generates a full installation bundle with sanitized credentials:

Version Info File

Important Notes

Configuration Options

Option Description Default
exclude_update Paths to exclude from update packages See config
add_update_file Files/folders to explicitly include in update packages See config
exclude_new Paths to exclude from new installation packages See config
output_directory Directory for generated packages storage/app/update_files
git_timeout Git command timeout in seconds 300
enable_logging Enable logging for debugging true
clear_cache_before_generation Clear cache before generating packages true
sanitize_env_file Sanitize .env file for new installations true
env_sanitization_rules Rules for sanitizing environment variables See config

Additional Files Configuration

The add_update_file option allows you to explicitly include specific files or folders in your update packages, even if they're in excluded paths. This is particularly useful for:

Example:

Environment File Sanitization

The package automatically sanitizes sensitive data in .env files when generating new installation packages. This ensures that:

Before Sanitization:

After Sanitization:

Wildcard Exclusion Patterns

Use wildcard patterns (*) to exclude directory contents while preserving the directory structure:

This ensures that:

Cache Management

The package automatically clears various cache types before generating packages:

This ensures that no cached data is included in your packages, keeping them clean and up-to-date.

Best Practices

  1. Version Naming: Use semantic versioning (e.g., 1.0.0, 1.1.0)
  2. Date Format: Always use YYYY-MM-DD format for dates
  3. Git Repository: Ensure you're in a Git repository before running commands
  4. Exclusions: Configure appropriate exclusions for your project
  5. Custom Files: Use add_update_file to include essential custom packages and dependencies
  6. Testing: Test generated packages in a staging environment before production use
  7. Environment Security: Always enable .env sanitization for production packages
  8. Wildcard Patterns: Use wildcard patterns (*) to exclude directory contents while preserving structure
  9. Cache Clearing: Keep clear_cache_before_generation enabled to ensure clean packages
  10. Sanitization Rules: Customize env_sanitization_rules to match your application's needs

Recent Updates

πŸ’» Modern Interactive CLI UI

πŸ”„ Commit-Based Generation

πŸ”’ Security Enhancements

πŸ› οΈ Technical Improvements

πŸ“¦ Package Generation

βš™οΈ Configuration Options

Troubleshooting

Common Issues

Q: Getting "Failed to create ZIP archive" error? A: This has been fixed by using PHP's built-in ZipArchive. Ensure the PHP zip extension is installed and enabled on your system.

Q: New installation packages missing essential directories? A: Use wildcard patterns like storage/logs/* instead of storage/logs to preserve directory structure.

Q: Sensitive data in .env files? A: Enable sanitize_env_file and configure env_sanitization_rules to automatically clean sensitive data.

Q: Package generation in infinite loop? A: This has been fixed by using system temp directory and proper path validation.

Q: Missing vendor files in new installations? A: The package now automatically includes essential vendor files like vendor/autoload.php and vendor/composer.

License

This package is open-sourced software licensed under the MIT license.

πŸ’‘ Support

πŸ‘¨β€πŸ’» Created by Mahesh Kerai – A passionate Laravel developer who loves building clean and scalable solutions.
🌟 β€œHelping developers save time with automation and smarter workflows.”

πŸ“¬ For questions, feedback, or support:


✨ Made with ❀️, β˜•, and a lot of Laravel magic by Mahesh Kerai.

Made with ❀️ by Mahesh Kerai


All versions of update-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/filesystem Version ^9.0|^10.0|^11.0|^12.0|^13.0
laravel/prompts Version ^0.1|^0.2|^0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mahesh-kerai/update-generator contains the following files

Loading the files please wait ...