Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit c5ffa72

Browse files
authored
Merge pull request #5976 from drpayyne/patch-44
Fixed incorrect module dependency examples
2 parents 382a501 + 8d49d1f commit c5ffa72

File tree

1 file changed

+19
-7
lines changed
  • guides/v2.2/architecture/archi_perspectives/components/modules

1 file changed

+19
-7
lines changed

guides/v2.2/architecture/archi_perspectives/components/modules/mod_depend.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The `require` section of `app/code/<Vendor>/<Module>/composer.json` file contain
4545
"magento/module-variable": "100.3.*",
4646
"magento/module-widget": "101.1.*",
4747
"magento/module-authorization": "100.3.*"
48-
},
48+
}
4949
...
5050
```
5151

@@ -57,15 +57,27 @@ A module with a *soft dependency* on another module can function properly withou
5757
* Extend another module's configuration.
5858
* Extend another module's [layout](https://glossary.magento.com/layout).
5959

60-
The `<sequence>` section of `app/code/<Vendor>/<Module>/etc/module.xml` file contains soft dependency definitions for the module. For example:
60+
The `suggest` section of `app/code/<Vendor>/<Module>/composer.json` file contains soft dependency definitions for the module. For example:
61+
62+
```json
63+
...
64+
"suggest": {
65+
"magento/module-graph-ql": "*",
66+
"magento/module-graph-ql-cache": "*",
67+
"magento/module-store-graph-ql": "*"
68+
}
69+
...
70+
```
71+
72+
The `<sequence>` node of `app/code/<Vendor>/<Module>/etc/module.xml` file also contains soft dependency definitions for the module. For example:
6173

6274
```xml
6375
<module name="Magento_Cms">
64-
<sequence>
65-
<module name="Magento_Store"/>
66-
<module name="Magento_Theme"/>
67-
<module name="Magento_Variable"/>
68-
</sequence>
76+
<sequence>
77+
<module name="Magento_Store"/>
78+
<module name="Magento_Theme"/>
79+
<module name="Magento_Variable"/>
80+
</sequence>
6981
</module>
7082
```
7183

0 commit comments

Comments
 (0)