public function getOutdatedPackages(array $excluded = [])
    {
        // Get all installed and required packages.
        $installed = $this->composer->getInstalledPackages();
        $required = $this->composer->getRequiredPackages();

        $outdated = [];

        // Get the installed version number of the required packages.
        $packages = array_intersect_key($installed, $required);

        foreach ($packages as $package) {
            $name = $package['name'];
            $version = Version::normalize($package['version']);
            $prettyVersion = $required[$name]['version'];
            $devDependency = $package['devDependency'];

            if (in_array($name, $excluded)) {
                continue;
            }

            $package = new Package($name, $version, $prettyVersion, $devDependency);

            if ($package->isOutdated()) {
                $outdated[] = $package;
            }
        }

        return $outdated;
    }
public function getOutdatedPackages(array $excluded = [])
    {
        // Get all installed and required packages.
        $installed = $this->composer->getInstalledPackages();
        $required = $this->composer->getRequiredPackages();

        $outdated = [];

        // Get the installed version number of the required packages.
        $packages = array_intersect_key($installed, $required);

        foreach ($packages as $package) {
            $name = $package['name'];
            $version = Version::normalize($package['version']);
            $prettyVersion = $required[$name]['version'];
            $devDependency = $package['devDependency'];

            if (in_array($name, $excluded)) {
                continue;
            }

            $package = new Package($name, $version, $prettyVersion, $devDependency);

            if ($package->isOutdated()) {
                $outdated[] = $package;
            }
        }

        return $outdated;
    }
public function getOutdatedPackages ( array $ excluded = [ ] ) { // Get all installed and required packages. $ installed = $ this -> composer -> getInstalledPackages ( ) ; $ required = $ this -> composer -> getRequiredPackages ( ) ; $ outdated = [ ] ; // Get the installed version number of the required packages. $ packages = array_intersect_key ( $ installed , $ required ) ; foreach ( $ packages as $ package ) { $ name = $ package [ 'name' ] ; $ version = Version :: normalize ( $ package [ 'version' ] ) ; $ prettyVersion = $ required [ $ name ] [ 'version' ] ; $ devDependency = $ package [ 'devDependency' ] ; if ( in_array ( $ name , $ excluded ) ) { continue ; } $ package = new Package ( $ name , $ version , $ prettyVersion , $ devDependency ) ; if ( $ package -> isOutdated ( ) ) { $ outdated [ ] = $ package ; } } return $ outdated ; }
Get outdated packages with their current and latest version.

@param array $excluded

@return array
Get outdated packages with their current and latest version .