Releases: Digicreon/Temma
2.18.0
AI datasource
Add unified AI datasource with OpenAI, Claude, Gemini, Mistral, OpenRouter, Ollama and OpenAI-compatible providers.
- Change DSN format to use
#for the API key separator instead of/, allowing model names to contain/and:(e.g. OpenRouter, Ollama). - Bracket syntax supports URLs for any OpenAI-compatible service and class names for custom providers.
- Fix JSON output: move
json_decodefromread()toget(), add JSON instruction to system prompt instead of relying onresponse_format. - Override
offsetGet()so array-access syntax usesread()(text) instead ofget()(JSON). - Mark
\Temma\Datasources\OpenAias deprecated.
Datasources and DAOs
Add $sort parameter to find() and search() and accept bool true in Dao::search().
- Datasources: new
$sortparameter (null|bool|string|array) between$getValuesand$offset.
null=natural,true=descending,false=random,string/array=fields with '-' prefix or['field' => 'asc'|'desc']. SQL datasource supports fieldskeyanddata; Redis/File/S3 only handlenull/true/false(field-based sort throws); queue datasources (Beanstalk/Sqs/Smsmode) keepsearch()disabled. Dao::search()andDao::update():$sortwidened tonull|bool|string|array;truenow generatesORDER BY {primary_key} DESC.- Base/Datasource:
protected _normalizeSort()helper to parse string/array sort criteria into[field, 'asc'|'desc']pairs. - Datasources: Add pagination (offset/limit) to find()/search() and pattern filtering to count().
Data validation
Request: Filter empty strings from GET/POST data before validation.
HTML forms send empty strings for unfilled fields, causing optional fields to fail validation. Treat empty strings as absent values in Request::validateInput() so that optional keys with empty values are correctly ignored and required keys with empty values properly fail.
Check attributes
Add logging on validation failure.
Redis datasource
Debug find() and search() when no matching key.
Controllers
Methods _view() and _template() returns self::EXEC_FORWARD.
Loader
Normalize keys in set() like in get() (remove leading backslashes).
2.16.0
New datasource
New features
- Autoload: improve management of declared include paths.
- Loader (dependency injection)
- Autowiring
- Preloading
- Dynamic callbacks
- Improved alias management
- Simplified prefix management
- Manage full namespaces on prefixes.
- Process attributes only for controllers and controller actions.
- Framework: use Loader to instantiate log managers.
- DataFilter
- Add types: Binary, Base64, hash
- JSON: add
contractparameter. - URL: add extra parameters.
- Add
outputparameter. mimeparameter is now optional forbinarytype.- Add
minLen/maxLenparameters tolist,json,base64types. minLen/maxLenparameters supportsK/M/G/T/P/Esuffix.- Assume
assoccontract when array contracts withouttypedefined. - Add
charsetparameter forstringandbinary. - Add
valueparameter to list validation. - Support wildcard keys and subcontracts to validate extra keys in assoc.
- Request:
- Add
validateParams(),validatePayload()andvalidateFiles()methods. - Add payload management (validation and getters).
- Add
- Session: Enforce secure cookie parameters (Lax/HttpOnly) for native PHP sessions fallback.
- Command-line interface: register data sources directly in the loader.
- Check attributes: add
Check\Payload,Check\Params,Check\Get,Check\Post,Check\FilesandCheckOutput. - Text: add
mimeTypesMatch()andparseSize(). - View attribute: add adaptative view option.
- Controllers: Debug loading default controller's template.
- SQL datasource: Add request parameters in
exec(),queryOne()andqueryAll()methods. - Improve redirection management in Response, Controller and attributes.
2.14.0
New datasources
New features
- DataFilter:
- Add strict mode (at call or at type definition).
- Add optional fields in associative arrays.
- Add new types (date, time, datetime, uuid, isbn, ean, ip, ipv4, ipv6, mac, port, slug, json, color, geo, phone).
- Auth controller: Check email domain is valid. Add auth attempts rate limit.
Improvements
- Comma: Add loader aliases and prefixes management.
- Auth controller: Manage interactions with the Language plugin.
- Memcache datasource: Improved tests.
Debugs
- Redis datasource: Prevent assignment bug under PHP 8.3.26+.
2.12.1
New feature
- ExtendedArray: add hasOnlyScalarValues() method.
Improvements
- Comma: use a registry instead of an array to store datasources.
- Dumper: better recursion management.
- Example configuration files: Rename root controller from 'HomepageController' to 'Homepage'.
Debugs
2.12.0
New features
- Debug bar: minor style evolution.
- Registry: accepts null parameter for the isset() and unset() methods.
- Cache plugin: management of response's prepend/append streams.
- Language plugin: management of 'readTranslationFile' configuration parameter.
- Temma CLI: namespace debug.
- Memcache datasource: namespace management.
Debugs
2.10.0
2.8.0
2.6.0
New features
- Add flash variables.
- Add Debug plugin. It can be used to show a debug bar on development environments.
- Add KebabCaseUrl plugin, usable to manage kebab-case URLs.
- Add ExtendedArray utility object. Used to improve configuration overloading by platform.
- Session: add 'cookieDomain' parameter in configuration.
- Email: add templatedMail() method.
- Text: add ascii(), hasLower(), hasUpper() and convertCase() methods.
- Request: add isAjax() method.
- Response and Smarty view: add HTML stream prepend and append.
- Auth attribute: add flash variable to tell why a user is not allowed to access to a resource.
Internal modification
- Auth controller: change session variables to flash variables.
Debugs
- Auth controller: manage empty roles or services.
- Log: code refactoring.
- Add information (file name and line number) in case of critical error
2.4.0
New features
- Asynk: Stable version of Temma's asynchronous processing.
- Add CLI command for Temma updates.
- Dao: add 'sort' and 'limit' parameters to update() method.
- Add Discord datasource.
- SQS datasource: add long polling duration option on readings.
- Loader: replace the
dataSourcesarray by a Registry object, to allow object-oriented usage.
Debugs
- Configuration: overloading by environment.
- Router plugin: debug action with no parameter.
- Socket datasource: initialization.
2.2.0
Smarty view
- Enable auto-escaping.
- Management of Smarty v5 in addition to Smarty v4.
- Add 'hash' Smarty modifier.
Language plugin
- Add l10n Smarty block tag.
- Add support for translation files in PHP, JSON, YAML, Neon formats.
New features
- Loader: add controller and DAO instantiation.
- Sql datasource: add buffered requests.
- Dao: add support for associative array as criteria in count(), get(), search(), remove() and update() methods.
- Config: management of the ENVIRONMENT environment variable, for dynamic configuration file loading.
- BaseConvert: add special bases.