Example #1
0
 /**
  * Install a composer project
  */
 public function install()
 {
     $installer = $this->_getInstaller(false);
     $function = $this->_wrap(function () use($installer) {
         $result = $installer->run();
         return $result;
     });
     $result = $function();
     if ($result !== 0) {
         throw new Exception\ComposerException('Composer install failed: ' . $this->_io->getLastError());
     }
     return $this;
 }