Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Idea: Funding #89

Open
icanhazstring opened this issue Nov 3, 2020 · 4 comments
Open

Feature Idea: Funding #89

icanhazstring opened this issue Nov 3, 2020 · 4 comments

Comments

@icanhazstring
Copy link
Contributor

icanhazstring commented Nov 3, 2020

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
@theseer
Copy link
Member

theseer commented Nov 3, 2020

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 ;)

@icanhazstring
Copy link
Contributor Author

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.

@theseer
Copy link
Member

theseer commented Nov 3, 2020

Can you open a ticket in phar-io/manifest? :)

@icanhazstring
Copy link
Contributor Author

Will do and link this one 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants