Repository navigation
3.5.4
Full Changelog: 3.5.3...3.5.4
New Features
Core Application Class
Introduced support for early application termination and lifecycle hooks:
onPreCreate- Invoked before the application and routing system are initialized.terminate- Allows early termination of the application before full initialization.onTerminate- Called before termination to determine whether the application should proceed with termination. Returntrueto allow orfalseto cancel.onTerminated- Executed after the application has been terminated.
Request Rate Limiter
Added a lightweight request rate limiter class supporting:
Memcached,Redis,FileCache, or any PSR-6CacheItemPoolInterfaceandandCacheInterfacecompatible implementations.- Dynamic message formats and retry-after calculation.
- Custom headers and response formatting.
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.
HTTP Upload File Object
New method added:
getMimeFromFile- Detects MIME type from a temporary file path or binary data.
Sitemap Generator Configuration
New configuration option:
public int $maxExecutionTime = 300- Specifies the maximum execution time in seconds. Set to0for unlimited execution time.
Optimizations
Sitemap Generator Configuration
- Added support for global pattern matching using
@(pattern)in theignoreUrlsandskipStaticHtmlconfig properties. - Improved performance and memory usage.
- Enhanced skipped-page reporting and better handling of execution time limits.
Bug Fixes
Database ORM Builder
- Fixed a memory exhaustion issue in the
Builder::exec(...)method caused by a recent update.
Deprecated
HTTP Upload File Object
getMimeFromTemp- Deprecated. UsegetMimeFromFileinstead.
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;
}