Preferences in Magento 2 are much like rewrites in Magento 1. They basically let you substitute one instance of a class for another inside of Magento 2. This is very a very powerful feature, but also comes with the same responsibility of Magento 1. Basically, no two modules can rewrite the same class. If two modules attempt to do so, there will be a conflict.
So, how do you create a preference in Magento 2? Through XML, you can create a preference. [Read more…]