Skip to content

Commit

Permalink
Hacky work-around for cweagans#123 .
Browse files Browse the repository at this point in the history
  • Loading branch information
rgristroph committed May 5, 2017
1 parent b3036f2 commit 2048901
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Patches.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ public function postInstall(PackageEvent $event) {
$extra['patches_applied'] = array();

foreach ($this->patches[$package_name] as $description => $url) {
// Hack, not final fix. See https://github.com/cweagans/composer-patches/issues/123
if (is_array($description)) { $description = $description[0]; }
if (is_array($url)) { $url = $url[0]; }
$this->io->write(' <info>' . $url . '</info> (<comment>' . $description. '</comment>)');
try {
$this->eventDispatcher->dispatch(NULL, new PatchEvent(PatchEvents::PRE_PATCH_APPLY, $package, $url, $description));
Expand Down Expand Up @@ -418,6 +421,9 @@ protected function writePatchReport($patches, $directory) {
$output = "This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)\n";
$output .= "Patches applied to this directory:\n\n";
foreach ($patches as $description => $url) {
// Hack, not final fix. See https://github.com/cweagans/composer-patches/issues/123
if (is_array($description)) { $description = $description[0]; }
if (is_array($url)) { $url = $url[0]; }
$output .= $description . "\n";
$output .= 'Source: ' . $url . "\n\n\n";
}
Expand Down

0 comments on commit 2048901

Please sign in to comment.