LEtudiant\Composer\SharedPackagePlugin::activate PHP Method

activate() public method

public activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
$composer Composer\Composer
$io Composer\IO\IOInterface
    public function activate(Composer $composer, IOInterface $io)
    {
        $config = $this->setConfig($composer);
        $composer->getInstallationManager()->addInstaller(new SharedPackageInstallerSolver(new SharedPackageSolver($config), new SharedPackageInstaller($io, $composer, new SymlinkFilesystem(), new SharedPackageDataManager($composer), $config), new LibraryInstaller($io, $composer)));
    }

Usage Example

 /**
  * @test
  */
 public function active()
 {
     $this->im->expects($this->once())->method('addInstaller');
     $plugin = new SharedPackagePlugin();
     $plugin->activate($this->composer, $this->io);
 }
SharedPackagePlugin