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;
    }