protected function getLocalRepositoryPackages($excludeRootPackage = false)
    {
        $repositoryManager = $this->composer->getRepositoryManager();
        $localRepository = $repositoryManager->getLocalRepository();
        $packages = $localRepository->getPackages();
        if ($excludeRootPackage) {
            $result = array();
            foreach ($packages as $package) {
                if (!$package instanceof RootPackageInterface) {
                    $result[] = $package;
                }
            }
        } else {
            $result = $packages;
        }

        return $result;
    }