v0.6
New features
- rename of consumer annotation property (media type -> media range)
- migration from Zend to Laminas packages due to global brand change:
zendframework/zend-expressive
->mezzio/mezzio
zendframework/zend-servicemanager
->laminas/laminas-servicemanager
zendframework/zend-stdlib
->laminas/laminas-stdlib
- library no longer depends from
zendframework/zend-http
- metadata and default router caching mechanism overhaul:
- library no longer relies directly on
zendframework/zend-cache
, you may use any implementation ofpsr/simple-cache
you like - simple partial PSR-16 implementation optimized for metadata storage and default router cache is provided out-of-the-box
- library no longer relies directly on
- it is now possible to specify custom object instanciator in Transfer attribute options
Migration notes
Sadly migration might be a bit cumbersome because you have to apply quite a lot small technical changes.
Update your consumer annotations
You need to rename mediaType
parameter to mediaRange
wherever you use Articus\PathHandler\Annotation\Consumer
annotation.
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\PathHandler\RouteInjection\Factory:
metadata:
cache:
adapter: filesystem
options:
cache_dir: data/PathHandler
namespace: ph-metadata
plugins:
serializer:
serializer: phpserialize
Articus\PathHandler\RouteInjection\Factory:
router:
cache:
adapter: filesystem
options:
cache_dir: data/PathHandler
namespace: ph-router
plugins:
serializer:
serializer: phpserialize
Now it requires only one extra dependency psr/simple-cache
and tiny configuration:
Articus\PathHandler\RouteInjection\Factory:
metadata:
cache:
directory: data/PathHandler
Articus\PathHandler\RouteInjection\Factory:
router:
cache:
directory: data/PathHandler
If you use separate caching service no configuration changes should be needed.