protected function findPackageGlobal($packageName)
    {
        $packagePair = new PackageNameVersion($packageName);

        if (isset($this->packageCache[$packagePair->getNormalizedNameVersion()])) {
            return $this->packageCache[$packagePair->getNormalizedNameVersion()];
        }

        $composer = $this->embeddedComposer->createComposer($this->io);
        $repoManager = $composer->getRepositoryManager();

        $name = $packagePair->getName();
        $version = $packagePair->getVersion();
        $composerPackage = $this->packageCache[$packageName] = $repoManager->findPackage($name, $version);

        return $composerPackage;
    }
protected function findPackageGlobal($packageName)
    {
        $packagePair = new PackageNameVersion($packageName);

        if (isset($this->packageCache[$packagePair->getNormalizedNameVersion()])) {
            return $this->packageCache[$packagePair->getNormalizedNameVersion()];
        }

        $composer = $this->embeddedComposer->createComposer($this->io);
        $repoManager = $composer->getRepositoryManager();

        $name = $packagePair->getName();
        $version = $packagePair->getVersion();
        $composerPackage = $this->packageCache[$packageName] = $repoManager->findPackage($name, $version);

        return $composerPackage;
    }
protected function findPackageGlobal ( $ packageName ) { $ packagePair = new PackageNameVersion ( $ packageName ) ; if ( isset ( $ this -> packageCache [ $ packagePair -> getNormalizedNameVersion ( ) ] ) ) { return $ this -> packageCache [ $ packagePair -> getNormalizedNameVersion ( ) ] ; } $ composer = $ this -> embeddedComposer -> createComposer ( $ this -> io ) ; $ repoManager = $ composer -> getRepositoryManager ( ) ; $ name = $ packagePair -> getName ( ) ; $ version = $ packagePair -> getVersion ( ) ; $ composerPackage = $ this -> packageCache [ $ packageName ] = $ repoManager -> findPackage ( $ name , $ version ) ; return $ composerPackage ; }
Recovers the data of a package registered in repositories such as packagist.org.

@param string $packageName Package's name

@return Composer\Package\PackageInterface|null Null if the package not found
Recovers the data of a package registered in repositories such as packagist . org .