3.x has a very minimal BC break. But if you are not sure what are they, then you may feel the pain. I am trying to document most of them, incase I missed please edit and send a pull request.
I will try to eventually pushed to the main Aura.Di repo.
BC Breaks #
Instantiation #
The way di container is instantiated has been changed from
|
|
to
|
|
setter vs setters #
$di->setter is now $di->setters. Please note there is an additional s in the end. https://github.com/auraphp/Aura.Di/issues/115.
Automatic locking #
Automatic locking of container once an object is created by container. So make sure everything is lazy call, else you will run something like Cannot modify container when locked.
Config vs ContainerConfig #
Version 2 Aura\Di\Config is now Aura\Di\ContainerConfig
Features #
lazyGetCall #
Example taken from Radar
|
|
Here the matcher assigned is taken from the RouterContainer getMatcher method.
Instance Factories #
Create multiple instances of the class. You can read the docs