Skip to content

Commit

Permalink
Merge pull request #187 from phpbb/Nicofuma-patch-1
Browse files Browse the repository at this point in the history
Fix existing phpbb/phpbb requirement in extensions
  • Loading branch information
michaelcullum committed Sep 3, 2016
2 parents f4c2926 + 8a725ed commit 3ccb830
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contribution/extension/type.php
Expand Up @@ -291,12 +291,15 @@ protected function update_phpbb_requirement(array $data)
if (isset($data['extra']['soft-require']['phpbb/phpbb']))
{
$data['require']['phpbb/phpbb'] = $data['extra']['soft-require']['phpbb/phpbb'];

// fix common error (<=3.2.*@dev)
$data['require']['phpbb/phpbb'] = preg_replace('/(<|<=|~|\^|>|>=)([0-9]+(\.[0-9]+)?)\.[*x]/', '$1$2', $data['require']['phpbb/phpbb']);
}
}

if (isset($data['require']['phpbb/phpbb']))
{
// fix common error (<=3.2.*@dev, >=3.1.x)
$data['require']['phpbb/phpbb'] = preg_replace('/(<|<=|~|\^|>|>=)([0-9]+(\.[0-9]+)?)\.[*x]/', '$1$2', $data['require']['phpbb/phpbb']);
}

return $data;
}

Expand Down

0 comments on commit 3ccb830

Please sign in to comment.