Hirak\Prestissimo\Plugin::onPostDependenciesSolving PHP Method

onPostDependenciesSolving() public method

pre-fetch parallel by curl_multi
public onPostDependenciesSolving ( Composer\Installer\InstallerEvent $ev )
$ev Composer\Installer\InstallerEvent
    public function onPostDependenciesSolving(Installer\InstallerEvent $ev)
    {
        if ($this->disabled) {
            return;
        }
        $prefetcher = new Prefetcher();
        $prefetcher->fetchAllFromOperations($this->io, $this->config, $ev->getOperations());
    }

Usage Example

Example #1
0
 public function testOnPostDependenciesSolving()
 {
     $plugin = new Plugin();
     $plugin->activate($this->composerp->reveal(), $this->iop->reveal());
     $evp = $this->prophesize('Composer\\Installer\\InstallerEvent');
     $evp->getOperations()->willReturn($this->createDummyOperations());
     // on enabled
     $plugin->onPostDependenciesSolving($evp->reveal());
     // on disabled
     $plugin->disable();
     $evp = $this->prophesize('Composer\\Installer\\InstallerEvent');
     $evp->getOperations()->shouldNotBeCalled();
     $plugin->onPostDependenciesSolving($evp->reveal());
 }