Skip to content

Releases: Digicreon/Temma

2.18.0

21 May 21:27

Choose a tag to compare

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_decode from read() to get(), add JSON instruction to system prompt instead of relying on response_format.
  • Override offsetGet() so array-access syntax uses read() (text) instead of get() (JSON).
  • Mark \Temma\Datasources\OpenAi as deprecated.

Datasources and DAOs

Add $sort parameter to find() and search() and accept bool true in Dao::search().

  • Datasources: new $sort parameter (null|bool|string|array) between $getValues and $offset.
    null=natural, true=descending, false=random, string/array=fields with '-' prefix or ['field' => 'asc'|'desc']. SQL datasource supports fields key and data; Redis/File/S3 only handle null/true/false (field-based sort throws); queue datasources (Beanstalk/Sqs/Smsmode) keep search() disabled.
  • Dao::search() and Dao::update(): $sort widened to null|bool|string|array; true now generates ORDER 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

18 Mar 21:42

Choose a tag to compare

New datasource

New features

  • Autoload: improve management of declared include paths.
  • Loader (dependency injection)
  • DataFilter
    • Add types: Binary, Base64, hash
    • JSON: add contract parameter.
    • URL: add extra parameters.
    • Add output parameter.
    • mime parameter is now optional for binary type.
    • Add minLen/maxLen parameters to list, json, base64 types.
    • minLen/maxLen parameters supports K/M/G/T/P/E suffix.
    • Assume assoc contract when array contracts without type defined.
    • Add charset parameter for string and binary.
    • Add value parameter to list validation.
    • Support wildcard keys and subcontracts to validate extra keys in assoc.
  • Request:
    • Add validateParams(), validatePayload() and validateFiles() methods.
    • Add payload management (validation and getters).
  • 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\Files and CheckOutput.
  • Text: add mimeTypesMatch() and parseSize().
  • View attribute: add adaptative view option.
  • Controllers: Debug loading default controller's template.
  • SQL datasource: Add request parameters in exec(), queryOne() and queryAll() methods.
  • Improve redirection management in Response, Controller and attributes.

2.14.0

17 Dec 21:50

Choose a tag to compare

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

17 May 21:14

Choose a tag to compare

New feature

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

  • Session: In extractPrefix(), avoid creating the session if there is no data.
  • Api plugin: debug ApiKey table management.
  • Auth controller: debug token log message.
  • Language plugin: avoid adding a slash character at the end of redirection URL.

2.12.0

26 Feb 11:37

Choose a tag to compare

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

  • Auth controller: debug login template.
  • Cache plugin: general behaviour.
  • Post-packaging script.

2.10.0

10 Dec 17:50

Choose a tag to compare

New feature

  • Composer installation: Creation of temma-lib, temma-project-web and temma-project-api sub-repositories.

Evolutions

  • API plugin: use password_verify() to validate private keys.

Doccumentation

  • Add Nginx example configuration.

2.8.0

01 Nov 08:45

Choose a tag to compare

New features

Debugs

  • Ansi: String '0' is not an empty string.
  • Debug plugin: add Temma version to debug bar.
  • Smarty view: debug flash variables access.
  • Text: edge case management.

2.6.0

13 Oct 16:57

Choose a tag to compare

New features

Internal modification

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

19 Sep 21:03

Choose a tag to compare

New features

Debugs

2.2.0

03 Sep 20:22

Choose a tag to compare

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