1
0
Fork 0

Merge branch '1.10'

pull/8746/head
Jordi Boggiano 2020-04-07 16:07:05 +02:00
commit 52d1b52eb6
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ class FundCommand extends BaseCommand
{
foreach ($package->getFunding() as $fundingOption) {
list($vendor, $packageName) = explode('/', $package->getPrettyName());
// ignore malformed funding entries
if (empty($fundingOption['url'])) {
continue;
}
$url = $fundingOption['url'];
if (!empty($fundingOption['type']) && $fundingOption['type'] === 'github' && preg_match('{^https://github.com/([^/]+)$}', $url, $match)) {
$url = 'https://github.com/sponsors/'.$match[1];