Skip to content

Releases: luminovang/luminova

2.3.3

09 Jul 21:30
Compare
Choose a tag to compare

Full Changelog: 2.3.2...2.3.3

Added

  • Add new database management constants.

Changes

  • Applied changes to configuration classes.
  • Rename database connection env key database.emulate.preparse to database.emulate.prepares

2.3.2

31 May 12:41
Compare
Choose a tag to compare

Full Changelog: 2.3.1...2.3.2

New Features

Database Configuration Class

Added sharding-related configuration options:

  • static bool $connectionSharding – Globally enable or disable automatic sharding.
  • static bool $shardFallbackOnError – Whether to fallback to backup servers if the selected shard is unreachable.
  • static getShardServerKey(): string – Returns the shard key used to determine the target database server.

Renamed

Database Configuration Properties

The following properties have been renamed for clarity and consistency:

  • Environment File: database.pdo.enginedatabase.pdo.version
  • Configuration Array Key: pdo_enginepdo_version
  • Connection Servers and Backup: static array $databaseBackupsstatic array $databaseServers

These changes help better reflect their purpose—defining the PDO driver version (e.g., mysql, pgsql, etc.).


ToDo

Update Your Database Configuration

To enable sharding support, update your Database Configuration Class with the following properties and method:

// /app/Config/Database.php

namespace App\Config;

use Luminova\Core\CoreDatabase;

class Database extends CoreDatabase
{
    /**
     * Enable or disable global connection sharding.
     * This setting does not affect direct use of the `shard()` method.
     */
    public static bool $connectionSharding = false;

    /**
     * If enabled, fallback to a backup server when the selected shard fails.
     * This setting does not affect direct use of the `shard()` method.
     */
    public static bool $shardFallbackOnError = false;

    /**
     * Optional list of sharded or backup database servers.
     */
    protected static array $databaseServers = [
        'NG' => [
            //...
            'pdo_version'  => 'mysql', // renamed from pdo_engine
        ],
    ];

    /**
     * Return a shard key used to select a target database server.
     * Typically based on geo-location, user ID, or any custom logic.
     */
    public static function getShardServerKey(): string 
    {
        return ''; // Return a key like 'NG', 'US', etc.
    }
}

Note:
Rename pdo_engine to pdo_version in all defined connections.
Also rename the property name $databaseBackups to $databaseServers.

Application Logging Configuration

Add a new static boolean property $telegramSendContext to the application logger configuration. This controls whether log context data is sent to Telegram when Telegram logging is enabled.

// /app/Config/Logger.php

namespace App\Config;

class Logger extends BaseConfig
{
    /**
     * Whether to include log context when sending messages to Telegram.
     */
    public static bool $telegramSendContext = false;
}

Purpose:
Allows fine-tuned control over the verbosity of logs sent to Telegram.

2.3.1

26 May 10:53
Compare
Choose a tag to compare

Full Changelog: 2.3.0...2.3.1

New Features

Introduced in Version 3.5.9

Dependency Injection Manager

Added support for custom dependency bindings using the Luminova\Routing\DI class or the bind method in the application instance.

Database Builder Enhancements

Introduced row-level locking support via the new method:

  • lockFor(...) – Enables row locking with either update (exclusive) or shared (read-only) modes.

2.3.0

08 May 04:18
Compare
Choose a tag to compare

Full Changelog: 2.2.8...2.3.0

New Features

Demos

Added HMVC and Console command demo.

Command Group Attribute

Added support for the Group attribute, which allows CLI controllers to define a command group at the class level.

Routing System Interface

The routing system now implements Luminova\Interface\RouterInterface, allowing full replacement with a custom routing implementation.

Application Base Class

New method getRouterInstance() added to retrieve router instance for application routing, making it easier to replace the routing system.

Crypter Utility Class

New methods added for validating cryptographic key types and pairs:

  • isPrivateKey() – Validates whether a given string is a private key.
  • isPublicKey() – Validates whether a given string is a public key.
  • isKeyMatch() – Verifies if a private and public key pair matches.

Command Utility Class (Terminal)

The Terminal class now includes new methods for retrieving system details and supporting CLI-based authentication:

  • systemInfo() – Returns structured system and terminal information.
  • getSystemId() – Generates a consistent, unique system identifier suitable for CLI authentication.
  • getTerminalName() – Retrieves the name of the current terminal in use.
  • getSystemModel() – Returns the device or system model (e.g., MacBook Pro, Dell XPS).
  • getPid() – Returns the parent process ID (PPID) for the current CLI session.
  • about() – Displays a formatted table of system and environment information. Also via command php novakit --system-info.
  • whoami() – Returns the current system user executing the CLI script.

Optimizations

Attribute Parser

Replaced reflection-based parsing with PHPToken to enhance performance and reduce overhead.

Boot Autoload

Updated HTTP method spoofing to rely on X-HTTP-Method-Override and restrict it to POST requests, aligning with RFC 7231.

Response Renderer

Enhanced response rendering for better accuracy and output consistency.

Uploaded File Configuration

Replaced the use of stdClass with a dedicated Luminova\Http\FileConfig configuration object for better structure and clarity.


Renamed Components

  • Luminova\Application\FoundationLuminova\Luminova
  • Luminova\Command\ConsoleLuminova\Command\Novakit
  • Luminova\Command\NovaKit\*Luminova\Command\Consoles\*
  • App\Controllers\Errors\ViewErrorApp\Errors\Controllers\ErrorController
  • /resources/Views/server_errors/*/app/Errors/Defaults/*

Deprecated

Command Handler (Terminal)

  • explain() – Deprecated. Use parse() instead.

Removed

The following deprecated methods have been removed:

  • Luminova\Http\File::getMimeFromTemp() – Use getMimeFromFile() instead.
  • Luminova\Routing\Router::before() – Use guard() instead.
  • Luminova\Security\Crypter::verify() – Use isPassword() instead.
  • Luminova\Sessions\Session::toExport() – Use getResult() instead.
  • Luminova\Sessions\Session::ssid() – Use getToken() instead.
  • Luminova\Sessions\Session::ssDate() – Use getDatetime() instead.
  • Luminova\Command\Terminal::color() – Use Luminova\Command\Utils\Color::apply(...) or Color::style(...) instead.

View All Changes

2.2.8

11 Apr 12:54
Compare
Choose a tag to compare

Full Changelog: 2.2.7...2.2.8

New Features

Global Helper Functions

New helper functions introduced:

  • set_function - Safely invokes a native PHP function only if it's not disabled.
  • set_max_execution_time - A custom wrapper for set_time_limit() that only sets the time limit if the current limit is lower and the function is not disabled.

Sitemap Generator Configuration

New configuration option:

  • public int $maxExecutionTime = 300 - Specifies the maximum execution time in seconds. Set to 0 for unlimited execution time.

Optimizations

Sitemap Generator Configuration

  • Added support for global pattern matching using @(pattern) in the ignoreUrls and skipStaticHtml config properties.
  • Improved performance and memory usage.
  • Enhanced skipped-page reporting and better handling of execution time limits.

Deprecated

HTTP Upload File Object

  • getMimeFromTemp - Deprecated. Use getMimeFromFile instead.

To-Do List

Update sitemap generator configuration class to include property $maxExecutionTime:

// /app/Config/Sitemap.php

namespace App\Config;

use Luminova\Base\BaseConfig;

final class Sitemap extends BaseConfig
{
  /**
   * @var int $maxExecutionTime
   */
  public int $maxExecutionTime = 300;
}

2.2.7

07 Apr 21:02
Compare
Choose a tag to compare

Full Changelog: 2.2.6...2.2.7

2.2.6

05 Mar 11:22
Compare
Choose a tag to compare

Full Changelog: 2.2.5...2.2.6

Fix

  • Resolved an installation error that occurred when a TODO.md file was present in the installing version.

2.2.5

27 Feb 12:49
Compare
Choose a tag to compare

Full Changelog: 2.2.4...2.2.5

Update Overview

Deprecated classes and methods will trigger warnings:

  • In development, a warning will be displayed.
  • In production, the warning will be logged at the warning level.

New Features

  • Session & Cookie Class:
    Introduced several new methods for improved session and cookie management:
    • put - Queue data for storage.
    • save - Persist all queued data.
    • dequeue - Remove queued data.
    • commit - Lock storage to prevent further modifications.
    • is - Check session or cookie status.
    • attempt / attempts - Manage login attempts.
    • regenerate - Regenerate session/cookie ID.
    • login - Alias for synchronize, initiates login and metadata storage.
    • logout - Alias for terminate, ends session and clears metadata.
    • isOnline - Alias for online, checks login status.
    • Getters - Retrieve session metadata (e.g., getToken, getUserAgent, getId).

Deprecations

  • Session & Cookie Class:
    The following methods are deprecated from Luminova\Sessions\Session:

    • toExport → Use getResult.
    • ssid → Use getToken.
    • ssDate → Use getDatetime.
  • Command Line Helper (Terminal Class):

    • color is deprecated.
      • Use Luminova\Command\Utils\Color::apply(...) or Luminova\Command\Utils\Color::style(...) for CLI text formatting.
  • Encryption Helper Class:

    • verify is deprecated.
      • Use Luminova\Security\Crypter::isPassword(...) instead for password hash verification.
  • Routing System:

    • before is deprecated.
      • Use Luminova\Routing\Router->guard(...) instead for CLI middleware authentication.

To-Do List

  • Session Namespace Update:
    Renamed session namespaces for clarity:

    • Luminova\Sessions\Handlersss\*Luminova\Sessions\Handlers\*.
    • Luminova\Sessions\Managersss\*Luminova\Sessions\Managers\*.
  • Session Configuration: Introduced a new property to enable or disable cookie data encryption:

// /app/Config/Session.php
namespace App\Config;

use Luminova\Base\BaseConfig;

final class Session extends BaseConfig
{
    /**
     * Enable cookie data encryption when managing sessions via `Luminova\Session\Managers\Cookie`.
     * If set to true, cookie data will be encrypted using the application encryption key and algorithm.
     *
     * @var bool $encryptCookieData
     */
    public bool $encryptCookieData = true;
}

2.2.4

29 Jan 11:07
Compare
Choose a tag to compare

Full Changelog: 2.2.3...2.2.4

Added New

  • TOTP Authenticator: Introduced the Luminova\Security\TOTP class to handle Time-Based One-Time Password (TOTP) authentication, enhancing security workflows.

  • TOTP Authenticator Client: Added the Luminova\Security\Authenticator\Google class. This Google Authenticator client implements Luminova\Interface\AuthenticatorInterface, enabling easy integration with the Luminova\Security\TOTP class for TOTP-based authentication.

  • Clear Writable Command: Added novakit helper commands (clear:writable, clear:caches, clear:routes, clear:storage, and clear:temp) to simplify file and folder clearing operations within the writable directory. For example, use php novakit clear:caches to clear caches efficiently.

  • System Logger Configuration: Introduced a new static method, getEmailLogTemplate, in the App\Config\Logger class, allowing users to customize log email templates to meet their specific requirements.


Optimizations

  • Application Logger: Improved logger performance and clarity, enabling all log levels (e.g., debug, info, error) to be called as static methods. Added two new methods for explicitly sending log to email or remote without relying on dispatch method:

    • remote: For sending logs to a remote server.
    • mail: For dispatching logs via email.
      Additionally, email templates are now fully customizable.
  • General Enhancements: Ensured compatibility with new features across the framework, maintaining backward compatibility while optimizing for better performance.

  • Coding Standard Fixer: Updated Luminova's coding standards for best PHP practices. Run composer cs-fix to apply fixes.


Changes

  • Application Logger: Updated the logger's dispatch method to a static signature, for easier call and improving consistency.

TO-DOs

For Luminova Framework version earlier thank (v3.4.7), the following changes are required:

  • Logger Configuration Update: After updating framework using composer command. Add a new static method, getEmailLogTemplate, in the logger configuration class to provide a customizable HTML log email template. This will be used whenever the application is configured to send logs via email.

Here's an example of the updated Logger class:

// /app/Config/Logger.php
namespace App\Config;

use Luminova\Base\BaseConfig;
use Luminova\Interface\HttpRequestInterface;

class Logger extends BaseConfig
{
    public static function getEmailLogTemplate(
        HttpRequestInterface $request, 
        string $message, 
        string $level, 
        array $context
    ): ?string 
    {
        return '<HTML-EMAIL-TEMPLATE>';
    }
}

For reference, the default email template can be found in the Latest Logger Configuration Class.

2.2.3

27 Dec 16:06
Compare
Choose a tag to compare

Full Changelog: 2.2.2...2.2.3

New Feature

Optimization

  • Database Base Model: Optimized database model removed unnecessary builder initialization. Also added exists method for checking if records exists.

Fixed

  • Fixed bug preventing errors and exceptions to being sent to email or remote server.