phar.io
phar.io copied to clipboard
Feature Idea: Funding
Afaik we do have currently two options to enable funding for PHP OSS.
On the one hand, there is the funding section for composer https://getcomposer.org/doc/04-schema.md#funding
On the other, there is GitHub sponsoring.
If one is installing a dependency using composer, a prompt will get shown that some packages have a funding.
Sadly with phive this is not possible.
So this is small discussion if we should add funding information to phive as well.
For example we could edit the repositories.xml accordingly:
<phar alias="composer-unused" composer="composer-unused/composer-unused">
<repository type="github" url="https://api.github.com/repos/composer-unused/composer-unused/releases" />
<funding type="GittHub" url="https://github.com/sponsors/icanhazstring"/>
<funding type="Paypal" url="https://paypal.me/icanhazstring"/>
</phar>
If we run phive install ... we could display information about the available funding for the installed tool.
$ phive install composer-unused --copy
Phive 0.14.4 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
Fetching repository list
Downloading https://phar.io/data/repositories.xml
Downloading https://github.com/composer-unused/composer-unused/releases/download/0.7.5/composer-unused.phar
Downloading https://github.com/composer-unused/composer-unused/releases/download/0.7.5/composer-unused.phar.asc
Copying composer-unused-0.7.5.phar to /Users/andreas.froemer/test/tools/composer-unused
There is funding available:
Github: https://github.com/sponsors/icanhazstring
Paypal: https://paypal.me/icanhazstring
While I'm not convinced that these banners actually lead to any additional sponsoring / funding, I guess hiding them in comparison to composer is also not the nicest thing we can do...
I don't see how adding them to the repositories.xml would work though, as this would be a maintenance nightmare: How do we get the up-to-date list of dependencies and how do we keep them in sync with the package content?
I do believe a better approach would be to extend phar-io/manifest to get the funding info added. Phive could then read and show that. That of course would require people to build a phar that has a manifest, but that's a different story ;)
I do believe a better approach would be to extend phar-io/manifest to get the funding info added. Phive could then read and show that.
That would be also a good idea. Since the "manifest" for the funding would be available as one would already have the .github/FUNDING.yml. Maybe we can read this using the phar-io/manifest to display such informations.
Can you open a ticket in phar-io/manifest? :)
Will do and link this one 👍