Skip to content

v2.2

Choose a tag to compare

@njoubert-cleverage njoubert-cleverage released this 01 Oct 08:33
· 58 commits to main since this release
0062bc1

Changes

  • #30 GetTask and SetTask: adapter, key and value are no longer required at configuration level (no placeholders needed), only once merged with the input; the key is validated by the task, so an invalid key always throws (Symfony adapters only validate keys with assert()). New AbstractCacheTask::getRequiredOptions(). Update documentation, add tests.
  • #31 GetTask: add an on_miss option (output_null by default, skip to send the input to the error outputs, fail) to handle cache misses. Update documentation, add tests.
  • #32 SetTask: add an expires_after option, to set the lifetime of the items. Update documentation, add tests.
  • #20 Add missing tests: GetTask and SetTask (options validation at initialization, context, missing adapter, stored null, overwriting), custom tasks extending AbstractCacheTask, Adapter, bundle and DI extension. Remove the obsolete test.old directory (tests of the v1 tasks and transformers).
  • #25 Give the ids of both services in the error on duplicate adapter codes: the adapters are registered by a compiler pass of the bundle, AdapterRegistry::addAdapter() gets an optional $serviceId argument. Update documentation, add tests.

Fixes

  • #28 Fix documentation: invalid cache keys are only rejected by Symfony adapters when assertions are enabled (an exception was documented in every case).
  • #22 Fix GetTask and SetTask: throw an explicit \UnexpectedValueException on a non-array input (a \TypeError was triggered by array_merge()). Update documentation, add tests.
  • #23 Fix GetTask and SetTask: validate the option values given by the input with the options resolver (they were used as is). Update documentation, add tests.