public function resolveDependencies($module){
        
        $version = $this->getModuleVersion($module);
        
        if(null === $version){
            throw new \Exception(sprintf(
                "Unable to resolve dependencies for module '%s'. Module definitions are missing or incomplete.", 
                $module
            ));
        }
        
        $resolved = new \ArrayObject();
        $this->resolveDepsRecursive($module, $version, $resolved);
        
        // Remove dependency to module itself if resolved version 
        // is less than or equal to current version.
        if($resolved->offsetExists($module) && SoftwareVersion::compare($resolved[$module], $version) <= 0){
            unset($resolved[$module]);
        }

        return $resolved;
    }