private function getSupportedPackages(array $packages)
    {
        $supported_packages = [];
        foreach ($packages as $package) {
            /* @var $package \Composer\Package\PackageInterface */
            if ($this->supportsPackage($package)) {
                $supported_packages[] = $package;
            }
        }
        return $supported_packages;
    }