module.xml
file contain a <sequence/>
node that acts like the old <depends/>
from Magento 1’s app/etc/modules
declaration files. There’s a small catch though – in order to make Magento recognize changes to your sequence, you need to run
bin/magento module:disable My_Module
bin/magento module:enable My_Module
That’s because Magento determines the sequence order by reading app/etc/config.php
, and the order in app/etc/config.php
is generated once – when Magento enables your module.