Releases: luminovang/luminova
2.3.3
2.3.2
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.engine
→database.pdo.version
- Configuration Array Key:
pdo_engine
→pdo_version
- Connection Servers and Backup:
static array $databaseBackups
→static 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:
Renamepdo_engine
topdo_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
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 eitherupdate
(exclusive) orshared
(read-only) modes.
2.3.0
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 commandphp 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\Foundation
→Luminova\Luminova
Luminova\Command\Console
→Luminova\Command\Novakit
Luminova\Command\NovaKit\*
→Luminova\Command\Consoles\*
App\Controllers\Errors\ViewError
→App\Errors\Controllers\ErrorController
/resources/Views/server_errors/*
→/app/Errors/Defaults/*
Deprecated
Command Handler (Terminal)
explain()
– Deprecated. Useparse()
instead.
Removed
The following deprecated methods have been removed:
Luminova\Http\File::getMimeFromTemp()
– UsegetMimeFromFile()
instead.Luminova\Routing\Router::before()
– Useguard()
instead.Luminova\Security\Crypter::verify()
– UseisPassword()
instead.Luminova\Sessions\Session::toExport()
– UsegetResult()
instead.Luminova\Sessions\Session::ssid()
– UsegetToken()
instead.Luminova\Sessions\Session::ssDate()
– UsegetDatetime()
instead.Luminova\Command\Terminal::color()
– UseLuminova\Command\Utils\Color::apply(...)
orColor::style(...)
instead.
2.2.8
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 forset_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 to0
for unlimited execution time.
Optimizations
Sitemap Generator Configuration
- Added support for global pattern matching using
@(pattern)
in theignoreUrls
andskipStaticHtml
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. UsegetMimeFromFile
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
Full Changelog: 2.2.6...2.2.7
2.2.6
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
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 forsynchronize
, initiates login and metadata storage.logout
- Alias forterminate
, ends session and clears metadata.isOnline
- Alias foronline
, checks login status.- Getters - Retrieve session metadata (e.g.,
getToken
,getUserAgent
,getId
).
Deprecations
-
Session & Cookie Class:
The following methods are deprecated fromLuminova\Sessions\Session
:toExport
→ UsegetResult
.ssid
→ UsegetToken
.ssDate
→ UsegetDatetime
.
-
Command Line Helper (Terminal Class):
color
is deprecated.- Use
Luminova\Command\Utils\Color::apply(...)
orLuminova\Command\Utils\Color::style(...)
for CLI text formatting.
- Use
-
verify
is deprecated.- Use
Luminova\Security\Crypter::isPassword(...)
instead for password hash verification.
- Use
-
before
is deprecated.- Use
Luminova\Routing\Router->guard(...)
instead for CLI middleware authentication.
- Use
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
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 implementsLuminova\Interface\AuthenticatorInterface
, enabling easy integration with theLuminova\Security\TOTP
class for TOTP-based authentication. -
Clear Writable Command: Added
novakit
helper commands (clear:writable
,clear:caches
,clear:routes
,clear:storage
, andclear:temp
) to simplify file and folder clearing operations within the writable directory. For example, usephp novakit clear:caches
to clear caches efficiently. -
System Logger Configuration: Introduced a new static method,
getEmailLogTemplate
, in theApp\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 ondispatch
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
Full Changelog: 2.2.2...2.2.3
New Feature
- Database Session Handler: Added support for managing session in database.
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.