Skip to content

Adding new initialization Method

Compare
Choose a tag to compare
@mamazu mamazu released this 02 Oct 10:00
· 34 commits to master since this release

If you want to have two traits at the same time with an alias like this

use SyliusSpecalPricePlugin {
__construct as private initSpecialPrices;
}
use SomeOtherPlugin {
__construct as private initOtherPlugin;
}

Then PHP will run the Constructor of the Special Price plugin for both of them:

initSpecialPrices => SyliusSpecalPricePlugin::__construct
initOtherPlugin => SyliusSpecalPricePlugin::__construct

This is why we now have a dedicated non constructor method.