Skip to content

Migrating version 0.10 to 0.11

Submodules Removed – Switch to Composer

Upgrade Steps

  1. Remove Submodule from Git

    git submodule deinit -f z_framework
    git rm -rf z_framework
    

    Then delete the leftover directory:

    .git/modules/z_framework
    

    This unregisters the submodule from Git so it won’t be tracked anymore.

  2. Remove from .gitmodules Delete the entry for z_framework, e.g.:

    [submodule "z_framework"]
        path = z_framework
        url = https://github.com/zubzet/framework.git
    

    This removes the last configuration reference to the submodule.

  3. Add via Composer

    composer require zubzet/framework
    

    The framework is now managed via Composer, making version upgrades and dependency handling much easier.

  4. Clean up index.php Remove this line:

    require_once "z_framework/main.php";
    

    The main.php is now loaded automatically through Composer’s autoloader, so you no longer need to include it manually.

Upgrade script for Linux
[ -d z_framework ] && rm -rf z_framework

git config --file .gitmodules --get-regexp 'submodule\.z_framework\.path' >/dev/null 2>&1 && \
    git submodule deinit -f z_framework && \
    git rm -f -r z_framework

[ -d .git/modules/z_framework ] && rm -rf .git/modules/z_framework
[ -f .gitmodules ] && sed -i '/\[submodule "z_framework"\]/,/^$/d' .gitmodules

composer require zubzet/framework

[ -f index.php ] && sed -i '/require_once\s\+"z_framework\/main.php";/d' index.php

After this, your project will automatically use the Composer autoloader and the framework will be ready to run.