This small update allows you to finally use the resolver methods directly. The resolver methods are generated when a container is compiled. The methods have the the return type their dependency which helps your IDE to help you.
This release introduces the ability to update service definitions after they have been defined.
It is possible to update already defined services with more construction calls and metadata.
This is quite handy to organize large amount of dependencies with a dynamic lookups.
You could for example define your logger in one file.
And add observers using a construction call where you need them.
@logger.observers.email_devs: Acme\EmailLogObserver('firstname.lastname@example.org') @logger.observers.email_support: Acme\EmailLogObserver('email@example.com') @logger.main - addObserver(@logger.observers.email_devs) - addObserver(@logger.observers.email_support)
The same is also true for metadata.
@controller.homepage: Controller\Homepage = on: '/homepage' // also show homepage on root @controller.homepage = on: '/'
This release brings container meta data support. In plain PHP and for the container language.
You are now able to assign meta data to a service as follows:
@my.event_listener: App\EventListener\Thing = on: 'something', call: 'handleTheThing'
Methods stacking has been fixed. You can now stack multiple calls to the same method together.
@my.registry: App\Registry - add('james') - add('John')