Skip to content

Commit

Permalink
Merge pull request #213 from cweagans/remove-patch-reports
Browse files Browse the repository at this point in the history
Remove patch report generation
  • Loading branch information
cweagans authored Jun 3, 2018
2 parents f17c40d + 317198e commit b0dc9cd
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/Plugin/Patches.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ public function activate(Composer $composer, IOInterface $io)
'type' => 'list',
'default' => [],
],
'disable-patch-reports' => [
'type' => 'bool',
'default' => false,
],
'patch-levels' => [
'type' => 'list',
'default' => ['-p1', '-p0', '-p2', '-p4']
Expand Down Expand Up @@ -344,9 +340,6 @@ public function postInstall(PackageEvent $event)
}
}
// $localPackage->setExtra($extra);

$this->io->write('');
$this->writePatchReport($this->patchCollection->getPatchesForPackage($package_name), $install_path);
}

/**
Expand Down Expand Up @@ -479,28 +472,6 @@ protected function isPatchingEnabled()
return $enabled;
}

/**
* Writes a patch report to the target directory.
*
* @param array $patches
* @param string $directory
*/
protected function writePatchReport($patches, $directory)
{
if ($this->getConfig('disable-patch-reports')) {
return;
}

$output = "This file was automatically generated by Composer Patches";
$output .= " (https://github.com/cweagans/composer-patches)\n";
$output .= "Patches applied to this directory:\n\n";
foreach ($patches as $index => $patch) {
$output .= $patch->description . "\n";
$output .= 'Source: ' . $patch->url . "\n\n\n";
}
file_put_contents($directory . "/PATCHES.txt", $output);
}

/**
* Executes a shell command with escaping.
*
Expand Down

0 comments on commit b0dc9cd

Please sign in to comment.