getIO(); $composer = $event->getComposer(); $installationManager = $composer->getInstallationManager(); $repositoryManager = $composer->getRepositoryManager(); $localRepository = $repositoryManager->getLocalRepository(); $configurationFile = __DIR__ . '/GeneratedConfig.php'; $pluginInstaller = new \Rector\RectorInstaller\PluginInstaller(new \Rector\RectorInstaller\LocalFilesystem(), $localRepository, $io, $installationManager, new \Composer\Util\Filesystem(), $configurationFile); $pluginInstaller->install(); } /** * @return array */ public static function getSubscribedEvents() : array { return [ScriptEvents::POST_INSTALL_CMD => 'process', ScriptEvents::POST_UPDATE_CMD => 'process']; } }