PHP Luminova: Luminova 3.9.5 Changelog
Release changes and upgrade steps for Luminova 3.9.5, including Redis caching, task scheduling, controller and model extension points, and HTTP response APIs.
Luminova 3.9.5 adds Redis caching, updates the framework’s extension points, and introduces a new filesystem task scheduler. This release also revises controller discovery, database model APIs, HTTP response handling, structured data, and PHP stream wrappers.
Added
- Redis cache driver. Use
RedisCacheor select the Redis provider through the service kernel. The driver supports persistent connections, single and bulk cache operations, key scanning, expiration, and delayed retrieval. It requires the PHP Redis extension and a Redis server. Redis Cache - Filesystem task scheduler. Extend
AbstractTaskSchedulerto define recurring jobs and run them through the Novakit scheduler. The scheduler accepts cron expressions, calendar dates, intervals, and time zones. Filesystem Task Scheduler - Shared stream wrapper base.
AbstractStreamWrapperprovides protocol registration, discovery, and default PHP stream callbacks.StreamWrapperuses it for local filesystem streams, andPhpEvalStreamuses it for framework-generated PHP source. Stream Wrapper Base Class · File Stream Wrapper · PHP Evaluation Stream Wrapper - HTTP header helpers. Added
Header::getDefault(),Header::getNoCacheHeaders(), andHeader::sendNoContentHeaders()for building response headers and sending HTTP 204 responses. HTTP Headers - IP lookup cache management. Added
IP::clearInfoCache()to remove cached lookup data for an individual address or clear the lookup cache. Client IP Address - Structured data builders. Added dedicated article and product schema builders, with support for author details, images, publication dates, offers, availability, and product condition. Structured Data
Changed
Application bootstrap and routing
- Introduced
AbstractApplicationandAbstractKernelas the application and service kernel extension points.Boot::http()now declaresAbstractApplicationas its return type. Application Class - The service kernel exposes provider methods for sessions, logging, email, HTTP clients, and caching. See Service Kernel.
- Renamed
Luminova\Routing\DItoLuminova\Routing\DependencyResolver. - Updated the attribute compiler to check that discovered controllers are instantiable and implement
RoutableInterface. CLI discovery resolves the group from#[Command]or the controller’s#[Group]and includes command aliases. Routing Overview - Updated bootstrap warmup, PHPVCI shared-autoload handling, and application and framework error-template lookup.
Controllers, Novakit, and scheduled tasks
- Introduced separate controller bases under
Luminova\Base\HttpandLuminova\Base\Cli. Routable CLI commands extendAbstractController, and commands registered directly with Novakit extendAbstractConsole. - Updated Novakit’s console registration to check the
AbstractConsolecontract and report when a class uses the wrong base. - Replaced the legacy cron worker and configuration with the scheduler worker and
AbstractTaskScheduler. Scheduled jobs specify the handler class and method separately. - Updated database task queue extensions to use
AbstractTaskQueueandTaskQueueTables.
Database and models
- Introduced
Luminova\Base\Database\AbstractModeland the database-specificAbstractConfig. Custom PDO and MySQLi configurations and drivers use the new configuration base. - Updated model hydration and attribute access, column allowlists, serialization, and query helpers for creating and updating records. Database Models
- Added
Builder::getCache()to expose the query builder’s cache instance. Query Builder - Renamed the table definition method from
getCreateQuery()togetQueryDefinition().
HTTP, templates, and error handling
- Updated
Template\Responsewith explicit APIs for content, headers, compression, HTML minification, and failure status. Template Response Handling - Changed template response redirects to accept a boolean Refresh-header option. The namespaced
redirect()andback()helpers use the same boolean option. - Updated default and no-cache headers. HTTP 204 responses remove content-related headers, and secure requests receive the default HSTS header.
- Updated Novio to allow callers to suppress selected outgoing headers and to include more context in request exceptions. Novio HTTP Client
- Changed
IP::info()to return an associative result withsuccessand eitherdetailsorerror. - Updated exception formatting through
Luminova\Foundation\Error\Error::sanitize()andError::toArray(). Review the response fields if your application maps framework exceptions into a custom JSON payload. Exception Handling
Utilities and integrations
- Renamed
Luminova\Utility\UtiltoLuminova\Utility\Formatter. Moved deterministic identifier generation toRandom::identifier()and verification toValidator::isIdentifier(). Both methods default tosha256. If you choose a different algorithm, pass it to both calls. - Updated the namespaced
sanitize()andstrict()helpers to use Formatter constants. Namespaced Helpers - Updated async and promise contracts to use
AwaitableInterface.Async::await()accepts anAwaitableInterface, aFiber, or a callable. The namespacedawait()helper accepts an awaitable. Async and Fibers - Changed
Serializer::unserialize()to return?objectand addedSerializer::isAnonymous(). Check that a restored object is aClosurebefore invoking it. Anonymous Object Serialization - Updated
CronInterval::convert()to accept a reference time as its second argument. Pass the time zone using the namedtimezoneargument. - Updated extension contracts for AI agents, email templates, caches, cookies, and session handlers. Google Authenticator and the rate limiter also expose cache configuration through
setCache().
Deprecated
These compatibility classes remain available in 3.9.5. Use their replacements in new code and update existing imports and parent classes when migrating. Class names in the tables are relative to Luminova\.
| Deprecated class | Replacement | Documentation |
|---|---|---|
Foundation\Core\Application | Foundation\Core\AbstractApplication | Application Class |
Foundation\Core\ServiceKernel | Foundation\Core\AbstractKernel | Service Kernel |
Base\Controller | Base\Http\AbstractController | HTTP Controllers |
Base\Command | Base\Cli\AbstractController | Routable CLI Controllers |
Base\Console | Base\Cli\AbstractConsole | Novakit Console Controllers |
Base\Model | Base\Database\AbstractModel | Database Models |
Config\Configuration | Base\AbstractConfig | Application Configuration |
Config\DatabaseConfig | Base\Database\AbstractConfig | Database Configuration |
Removed
Update calls, imports, and type declarations that use these former APIs.
| Removed API | Replacement or migration | Documentation |
|---|---|---|
Routing\DI | Routing\DependencyResolver | Controller Dependency Injection |
Utility\Util | Utility\Formatter, Random::identifier(), and Validator::isIdentifier() | Value Formatting · Random · Value Validation |
Config\CronTaskConfig and cronTime() | Extend Base\AbstractTaskScheduler, register handlers in schedule(), and call expression() for cron expressions. | Filesystem Task Scheduling |
Base\AIAgent | Base\AbstractAiAgent | AI Agent Base Class |
Base\Cache | Base\AbstractCache | Redis Cache |
Base\Cookie | Base\AbstractCookie | Cookie |
Base\Mailer | Base\AbstractEmailTemplate | Email Templates |
Base\SessionHandler | Base\AbstractSessionHandler | Session Handlers |
Base\Queue and Base\Helper\QueueTables | Base\AbstractTaskQueue and Base\Helper\TaskQueueTables | Database Task Queues |
Database\Driver\Helpers\AbstractBaseDriver | Database\Driver\Helpers\AbstractDatabaseDriver | PDO Driver · MySQLi Driver |
Interface\Arrayable and Interface\Awaitable | Interface\ArrayableInterface and Interface\AwaitableInterface | Interfaces |
Table::getCreateQuery() | Table::getQueryDefinition() | Table Schema Definition |
Template\Response::getProtocolVersion() | Remove calls to this method on template responses. See the current response API. | Template Response Handling |
Upgrade Notes
For the full upgrade sequence, see the 3.9.4 to 3.9.5 Migration Guide.
For template responses, migrate compress() to enableCompression(), minify() to enableHtmlMinifier(), and header() or headers() to setHeader() or setHeaders(). Replace content($body, $headers) with setContent($body) and setHeaders($headers). Use asFailed() to set the failure state and isFailed() to read it. getResult() now returns an array, and clearRedirects() returns void.
For filesystem schedules, move the definitions from CronTaskConfig into an AbstractTaskScheduler subclass. Replace cronTime() with expression(), then run php novakit cron:create --force once to rebuild the schedule. Rebuilding resets the task execution state. See Filesystem Task Queue.
Documentation Updates
The comparisons below describe what changed in the guides.
Common Helpers
- Before: Random generation listed both
intandintegeras digit-only modes and describedbytesas returning the requested byte count. - Now: Use
Random::generate(8, 'integer')for digits andRandom::bytes(8)for an exact byte count. See the class guides for barcode prefix limits, UUID timestamp units, and the colon-delimited input format forConverter::hexToBinary(). Random · UUID · Converter
Events
- Before: The singleton reference described
getInstance()as returning a new object. The registration reference omitted what happens when a hook is reused. - Now:
getInstance()returns the shared instance. Registering the same event and hook again replaces its callback. Emitting an unknown event or hook returns0. Events
FIFO Queue
- Before: The guide omitted
Queue::wait(), describedhas()as reporting removal, and left the index used bynext()unspecified. - Now: The guide shows how to create a queue with
Queue::wait($jobs)and start it withrun(). It describeshas()as a lookup, specifies thatnext()selects index1, and explains what the completion and response callbacks receive. FIFO Queue
Math Helpers
- Before: The arithmetic examples called methods such as
Math::divide()andMath::clamp()without corresponding reference entries. - Now: The reference includes signatures, parameters, and return values for arithmetic, range clamping, greatest common divisor, least common multiple, and prime and parity checks.
Math::divide()returnsnullfor both integer and floating-point zero divisors. Math Helpers
MIME Detection
- Before: The guide described the default extension as the most common match and said later database loads preserved existing mappings.
- Now:
Mime::findExtension()returns the first database match by default. With$allExtensions = true, it returns a list that is empty when there are no matches. Later database mappings replace earlier mappings for the same extension. MIME Detection
Pipe Chaining
- Before: The reference said that
LAST_STATEstopped execution and that stopping always madegetResult()returnnull. - Now:
LAST_STATEkeeps the current result and lets the next step run. In a synchronous step,STOPpreserves the previous result. In an error handler,STOPclears it tonull. Pipe Chains
Process Handler
- Before:
isRunning()was described as checking whether the process had finished. - Now:
isRunning()checks whether the handler has an open execution. The guide shows when to callwait()for output collection and whengetInfo()can return process metadata. Process Handler