Redis can only store strings
Redis only stores strings, so for example storing null means we will get '' (empty string) when we retrieve the value later. That's why the build is failing on master now.
This is just one of the problems, what about storing numbers, arrays, objects, … In general, how should we handle storages that can only store strings, like the MultipleFileStorage?
If those storages threw exception when the value is not a string, that means it breaks the LSP which is not ideal.
Should we force those string storages to use a "transformer" to be able to handle all types of data?
One idea I considered: We currently have Storage and Transformer. The latter transforms data, without any constraint on input and output (e.g. it can transform to string or to array or to whatever).
We could introduce a new interface Encoder that extends Transformer, except an encoder has to transform to and from string.
Because currently using a Transformer to encode breaks LSP (see here I ask for a transformer that encodes to string, that's expecting too much…).
Being able to ask for an Encoder would be more clean. Yet it wouldn't be adding yet another concept and duplicate implementations (encoders extend from transformers, so they could still be used as transformers).