In How to disable Magento 2 reviews , we tried to disable the module Magento_Review through the module:disable command

But if you do that, in 2.1, you will have multiples errors of dependency.

./magento module:disable Magento_Review

Unable to change status of modules because of the following constraints:
Cannot disable Magento_Review because modules depend on it:
Magento_Store: Magento_Store->Magento_Catalog->Magento_Customer->Magento_Review
Magento_AdminNotification: Magento_AdminNotification->Magento_Backend->Magento_Customer->Magento_Review
Magento_Eav: Magento_Eav->Magento_Backend->Magento_Customer->Magento_Review
Magento_Directory: Magento_Directory->Magento_Backend->Magento_Customer->Magento_Review
Magento_Theme: Magento_Theme->Magento_Customer->Magento_Review
Magento_Customer: Magento_Customer->Magento_Review
Magento_Indexer: Magento_Indexer->Magento_Backend->Magento_Customer->Magento_Review
Magento_Cms: Magento_Cms->Magento_Theme->Magento_Customer->Magento_Review
Magento_CatalogImportExport: Magento_CatalogImportExport->Magento_Customer->Magento_Review
Iazel_RegenProductUrl: Iazel_RegenProductUrl->Magento_CatalogUrlRewrite->Magento_CatalogImportExport->Magento_Customer->Magento_Review
Magento_Backend: Magento_Backend->Magento_Customer->Magento_Review

For Magento_Customer, there is no <Magento_Review/> in the <depends/> node of module.xml . But i think it is because there are some blocks in Mage_Customer that extends Mage_Reviews

namespace Magento\Customer\Block\Adminhtml\Edit\Tab;

class Reviews extends \Magento\Review\Block\Adminhtml\Grid

So... the circular check is doing the job all alone.

So my question : is the <depends/> node that important ? Or is it just "informational" ?

Note: i know it is supposed to impact the load order. But the fact is that even if you put a module in <depends>, if yours is alphabetically before it, it will load BEFORE it. The <sequence> node does a better job for that. The proof of that is to rewrite a di.xml, yours will be read BEFORE the one in <depends/> . Try my solution in How to disable Magento 2 reviews and replace the <sequence/> by <depends/> : it will not work.

1 Answer 1


<depends/> node does not exist/supports in Magento 2 module.xml files(looks like it present only in early version of Magento). Module dependencies declared in composer.json, not in module.xml.

If you review composer.json from Customer module you will see dependency on Review module. It's why you cannot disable this module

  • Ah yes, obviously, thx. But i still don't understand the true impact of <depends/>. <sequence/> trully change the order of load, not <depends/>, or maybe in a way that does not follow my way of thinking :) (loading order of xml are very important when you rewrite things, and <depends/> do not change that... ) Dec 3, 2016 at 14:50
  • I update answer to be more clear about depends nodes
    – KAndy
    Dec 3, 2016 at 18:40
  • Ok, so now i wonder where on earth i read that it worked in 2.x too. Maybe too much 1.x in brain :) Dec 3, 2016 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.