public static function getDirectories() {
        Logger::info("Resolving dependencies for project");
        $packages = array();
        $root = dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
        $composer = file_get_contents($root . DIRECTORY_SEPARATOR . 'composer.json');
        $composer = json_decode($composer, true);
        if (array_key_exists('require', $composer) && !empty($composer['require'])) {
            foreach ($composer['require'] as $requirement => $version) {
                $packages = array_merge(self::readFile($requirement), $packages);
            }
        } else {
            Logger::trace("Project has no dependencies");
        }
        foreach ($packages as $package) {
            Logger::debug("Project references package %s", $package);
        }
        Logger::info("%d dependencies found", count($packages));
        return $packages;
    }
public static function getDirectories() {
        Logger::info("Resolving dependencies for project");
        $packages = array();
        $root = dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
        $composer = file_get_contents($root . DIRECTORY_SEPARATOR . 'composer.json');
        $composer = json_decode($composer, true);
        if (array_key_exists('require', $composer) && !empty($composer['require'])) {
            foreach ($composer['require'] as $requirement => $version) {
                $packages = array_merge(self::readFile($requirement), $packages);
            }
        } else {
            Logger::trace("Project has no dependencies");
        }
        foreach ($packages as $package) {
            Logger::debug("Project references package %s", $package);
        }
        Logger::info("%d dependencies found", count($packages));
        return $packages;
    }
public static function getDirectories ( ) { Logger :: info ( "Resolving dependencies for project" ) ; $ packages = array ( ) ; $ root = dirname ( dirname ( dirname ( dirname ( dirname ( dirname ( dirname ( __FILE__ ) ) ) ) ) ) ) ; $ composer = file_get_contents ( $ root . DIRECTORY_SEPARATOR . 'composer.json' ) ; $ composer = json_decode ( $ composer , true ) ; if ( array_key_exists ( 'require' , $ composer ) && ! empty ( $ composer [ 'require' ] ) ) { foreach ( $ composer [ 'require' ] as $ requirement => $ version ) { $ packages = array_merge ( self :: readFile ( $ requirement ) , $ packages ) ; } } else { Logger :: trace ( "Project has no dependencies" ) ; } foreach ( $ packages as $ package ) { Logger :: debug ( "Project references package %s" , $ package ) ; } Logger :: info ( "%d dependencies found" , count ( $ packages ) ) ; return $ packages ; }
Returns the list of packages and all the other referenced packages from the composer file.

@return array the array of referenced packages
Returns the list of packages and all the other referenced packages from the composer file .