v0.4
New features
- strategies now control untyped data merge process before validation so custom hydration logic for your classes is no longer restricted by single instance of untyped data hydrator inside data transfer service
- migration from Zend to Laminas packages due to global brand change:
zendframework/zend-servicemanager->laminas/laminas-servicemanagerzendframework/zend-stdlib->laminas/laminas-stdlibzendframework/zend-validator->laminas/laminas-validator
- metadata caching mechanism overhaul:
- library no longer relies directly on
zendframework/zend-cache, you may use any implementation ofpsr/simple-cacheyou like - simple partial PSR-16 implementation optimized for metadata storage is provided out-of-the-box
- library no longer relies directly on
Migration notes
Sadly migration might be a bit cumbersome because you have to apply quite a lot small technical changes.
Update your custom strategies
Articus\DataTransfer\Strategy\StrategyInterface now requires to implement one more method, check Articus\DataTransfer\Strategy\MergerInterface::merge for details.
Migrate to Laminas
More or less it is just a namespace change both in your code and in your configuration. Check official guide for useful tips.
Check metadata cache configuration for production environment
Previously simple file caching for metadata required two extra dependencies ( zendframework/zend-cache and zendframework/zend-serializer) and quite lengthy configuration:
Articus\DataTransfer\MetadataProvider\Annotation:
cache:
adapter: filesystem
options:
cache_dir: data/DataTransfer
namespace: dt
plugins:
serializer:
serializer: phpserialize
Now it requires only one extra dependency psr/simple-cache and tiny configuration:
Articus\DataTransfer\MetadataProvider\Annotation:
cache:
directory: data/DataTransfer
If you use separate caching service no configuration changes should be needed.