Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

v2.9

Choose a tag to compare

@CallMeLeon167 CallMeLeon167 released this 04 May 15:19
· 3 commits to v2.9 since this release

Changes and Updates

  • Implemented PHP PSR formatting for better code readability and consistency.
  • Added cache directory to .gitignore to prevent unnecessary files from being tracked by version control.
  • Improved functionality of the useTrait function, enabling it to return the object.
  • Introduced the X-Powered-By header for enhanced framework identification.
  • Enhanced type hinting and return types for certain methods to improve code robustness and maintainability.
  • Updated documentation links within the code for improved reference accessibility.
  • Added comments for constants of the HTMLBuilder to enhance code documentation and readability.
  • Modified constants using the cml_config function for improved configuration management.
  • Renamed the build function to buildHTML to better reflect its purpose of constructing full HTML content.
  • Incorporated meta information from a route into the getAllRoutes function for enhanced route management.
  • Optimized the addRoute method by removing unused array keys.
  • Refactored the allMetas method to receive metadata for a specific route URL, enhancing flexibility and customization.
  • Updated composer.json file.
  • Renamed $router variable to $app in the index.php file.
  • Added new configuration options:
    • CACHE_PATH
    • CML_DEBUG_BAR
  • Introduced new CLI commands:
    • create:dump | Create a database dump
    • cml:version | Show CML Framework version
    • cml:update | Update CML Framework
    • cml:component | Download an official CML Framework Component from the docs
    • do:action | Call a function from the functions.php
    • help | Shows CML Framework command list
  • Renamed the functions sql2array_file and sql2db_file function to sqlFile2...

Fixed

  • Corrected wrong output of the where function for accurate query results.

Added

  • Added new files:
    • cml-functions.php
    • cml-vars.php
  • Introduced new functions:
    • cml_config (global) | Retrieves or sets the CML configuration values.
    • setHeader (app) | Set custom HTTP headers.
    • getAllHooks (app) | Returns all registered hooks.
    • setHook (app) | Adds a custom hook name to the list of registered hooks and echoes the hook content.
    • componentHook (app) | Adds a component to a hook.
    • whereIn (app) | Sets a "where in" condition for the current route.
  • Implemented a new Cache Class with the following functions:
    • cache: for static page caching.
    • setCacheData, getCacheData, deleteCacheData: for transient data management.
  • Added Debug-Bar functionality with the addBarElement function for custom box addition to the debug bar.
  • Added new functions setData, getData, deleteData: for saving, retrieving, and deleting data from the database respectively.

Full Changelog: v2.8...v2.9