GitHubDriver::getFundingInfo(): add support for thanks.dev and polar.sh
GitHub looks to have added a dedicated syntax for the thanks.dev funding platform when added to a `funding.yml` file. However, it looks like Composer does not (yet) support this syntax as can be seen from failed Packagist updates of the dev branches of the [PHP_CodeSniffer](https://packagist.org/packages/squizlabs/php_codesniffer#dev-master) and [PHPCompatibility](https://packagist.org/packages/phpcompatibility/php-compatibility) packages. The polar.sh funding platform also appears to be newly supported by GH and missing from the list. This PR fixes both. Refs: * https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repositorypull/12257/head
parent
ab390f6bf1
commit
ccdfb56078
|
@ -281,9 +281,15 @@ class GitHubDriver extends VcsDriver
|
|||
case 'tidelift':
|
||||
$result[$key]['url'] = 'https://tidelift.com/funding/github/' . $item['url'];
|
||||
break;
|
||||
case 'polar':
|
||||
$result[$key]['url'] = 'https://polar.sh/' . basename($item['url']);
|
||||
break;
|
||||
case 'buy_me_a_coffee':
|
||||
$result[$key]['url'] = 'https://www.buymeacoffee.com/' . basename($item['url']);
|
||||
break;
|
||||
case 'thanks_dev':
|
||||
$result[$key]['url'] = 'https://thanks.dev/' . basename($item['url']);
|
||||
break;
|
||||
case 'otechie':
|
||||
$result[$key]['url'] = 'https://otechie.com/' . basename($item['url']);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue