forked from magento/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenable-disable-modules.html
22 lines (19 loc) · 2.22 KB
/
enable-disable-modules.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<p>Magento enables you to enable or disable currently available modules; in other words, any Magento-provided module or any third-party module that is currently available.</p>
<p>Certain modules have dependencies on other modules, in which case you might not be able to enable or disable a module because it has dependencies on other modules. </p>
<p>In addition, there might be <em>conflicting</em> modules that cannot both be enabled at the same time.</p>
<p>Examples:</p>
<ul><li>Module A depends on Module B. You cannot disable Module B unless you first disable Module A.</li>
<li>Module A depends on Module B, both of which are disabled. You must enable module B before you can enable module A.</li>
<li>Module A conflicts with Module B. You can disable Module A and Module B, or you can disable either module but you <em>cannot</em> enable Module A and Module B at the same time.</li></ul>
<p>Dependencies are declared in the <code>require</code> field in Magento's <code>composer.json</code> file for each module. Conflicts are declared in the <code>conflict</code> field in modules' <code>composer.json</code> files. We use that information to build a dependency graph:</p>
<ul><li><code>A->B</code> means module A depends on module B.</li>
<li>A <em>dependency chain</em> is the path from a module to another one. For example, if module A depends on module B and module B depends on module C, then the dependency chain is <code>A->B->C</code>.</li></ul>
<p>If you attempt to enable or disable a module that depends on other modules, the dependency graph displays in the error message.</p>
<div class="bs-callout bs-callout-info" id="info">
<span class="glyphicon-class">
<p>It's possible that module A's <code>composer.json</code> declares a conflict with module B but not vice versa.</p></span>
</div>
<p><em>Command line <a href="{{page.baseurl}}install-gde/install/cli/install-cli-subcommands-enable.html">module enable or disable subcommand</a> only:</em> To force a module to be enabled or disabled regardless of its dependencies, use the optional <code>--force</code> argument.</p>
<div class="bs-callout bs-callout-warning">
<p>Using <code>--force</code> can disable your Magento store and cause problems accessing the Magento Admin.</p>
</div>