InstalledVersions::getInstalledPackages()

Returns a list of all package names which are present, either by being installed, replaced or provided


Return Return

(string[])


Top ↑

Source Source

File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php

    public static function getInstalledPackages()
    {
        $packages = array();
        foreach (self::getInstalled() as $installed) {
            $packages[] = array_keys($installed['versions']);
        }

        if (1 === \count($packages)) {
            return $packages[0];
        }

        return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
    }

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.