public function rewritingSelfVersionDependencies()
    {
        $composer = $this->embeddedComposer->createComposer($this->io);
        $package = $composer->getPackage();
        $configSource = new JsonConfigSource(new JsonFile('composer.json'));

        foreach (BasePackage::$supportedLinkTypes as $type => $meta) {
            foreach ($package->{'get'.$meta['method']}() as $link) {
                if ($link->getPrettyConstraint() === 'self.version') {
                    $configSource->addLink(
                        $type,
                        $link->getTarget(),
                        $package->getPrettyVersion()
                    );
                }
            }
        }
    }
public function rewritingSelfVersionDependencies()
    {
        $composer = $this->embeddedComposer->createComposer($this->io);
        $package = $composer->getPackage();
        $configSource = new JsonConfigSource(new JsonFile('composer.json'));

        foreach (BasePackage::$supportedLinkTypes as $type => $meta) {
            foreach ($package->{'get'.$meta['method']}() as $link) {
                if ($link->getPrettyConstraint() === 'self.version') {
                    $configSource->addLink(
                        $type,
                        $link->getTarget(),
                        $package->getPrettyVersion()
                    );
                }
            }
        }
    }
public function rewritingSelfVersionDependencies ( ) { $ composer = $ this -> embeddedComposer -> createComposer ( $ this -> io ) ; $ package = $ composer -> getPackage ( ) ; $ configSource = new JsonConfigSource ( new JsonFile ( 'composer.json' ) ) ; foreach ( BasePackage :: $ supportedLinkTypes as $ type => $ meta ) { foreach ( $ package -> { 'get' . $ meta [ 'method' ] } ( ) as $ link ) { if ( $ link -> getPrettyConstraint ( ) === 'self.version' ) { $ configSource -> addLink ( $ type , $ link -> getTarget ( ) , $ package -> getPrettyVersion ( ) ) ; } } } }
Rewriting "self.version" dependencies with explicit version numbers
of the current composer.json file. Useful if the package's vcs metadata
is gone.
Rewriting self . version dependencies with explicit version numbers of the current composer . json file . Useful if the package s vcs metadata is gone .