Documentation for using PHPDI with annotations lacked for me, so i learned how to use it and made myself a homework of working example.
composer install
it and run index.php in src/main/webapp/ directory, you should see that injected class's property will be dumped.
- Initial container configurations http://php-di.org/doc/container-configuration.html
- About setting up and using cache with annotations http://php-di.org/doc/performances.html#cache
- Annotation usage http://php-di.org/doc/annotations.html
- Best Practices http://php-di.org/doc/best-practices.html