How to get Dependent(Sequence) module list of a specific module programmatically in Magento 2?

You can get the list of dependent module and schema version for a specific module using programmatically by Magento\Framework\Module\ModuleList class.

You can manually check the list of the dependent module for a module using an etc/module.xml file.

Let’s we Check the dependency list for a Catalog Module. you can check the module.xml file for catalog module is,

<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Magento_Catalog" >
            <module name="Magento_Eav"/>
            <module name="Magento_Cms"/>
            <module name="Magento_Indexer"/>
            <module name="Magento_Customer"/>

you can check above XML, There are four modules on which catalog is dependent. 

You can get schema version and sequence list of the module using ModuleList.php file.

Check via Programmatically,

public function __construct(
    \Magento\Framework\Module\ModuleList $getSequenceList
) {
    $this->getSequenceList = $getSequenceList;

 * Return all dependent module of Magento_Catalog
 * @return Array
public function getAllDependentModule() {
    $moduleName = 'Magento_Catalog';
    $getSequenceArray = $this->getSequenceList->getOne($moduleName);
    return $getSequenceArray;

Call function from PHP file or template file, $this->getAllDependentModule();

Output will be array of all the Sequence module,

    [name] => Magento_Catalog
    [setup_version] =>
    [sequence] => Array
            [0] => Magento_Eav
            [1] => Magento_Cms
            [2] => Magento_Indexer
            [3] => Magento_Customer


Get all the active module list in Magento 2.