/** * Add any files which were deployed to the .gitignore * Remove any files which were removed to the .gitignore * * @param PackageDeployEvent $packageDeployEvent */ public function __invoke(PackageDeployEvent $packageDeployEvent) { $this->gitIgnore->addMultipleEntries($packageDeployEvent->getDeployEntry()->getDeployStrategy()->getDeployedFiles()); $this->gitIgnore->removeMultipleEntries($packageDeployEvent->getDeployEntry()->getDeployStrategy()->getRemovedFiles()); $this->gitIgnore->write(); }
/** * Remove any files which were removed to the .gitignore * * @param PackageUnInstallEvent $e */ public function removeUnInstalledFiles(PackageUnInstallEvent $e) { $this->gitIgnore->removeMultipleEntries($e->getInstalledFiles()); $this->gitIgnore->write(); }