Problem/Motivation

composer fund lists Composer dependencies that need funding.
It provides an easy way to find how to contribute financially to software you rely on.
Drupal core is not listed so people using Drupal can't easily find how to support Drupal financially.

Steps to reproduce

Run composer fund in a Drupal project: drupal/core is not listed.

Proposed resolution

We could add a funding key: https://getcomposer.org/doc/04-schema.md#funding
It could point to https://www.drupal.org/association/donate.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3573359

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
markconroy’s picture

If we do this - I'm not particularly against it - would we need any policy on contrib developers being allowed to add a funding key to the composer.json of their modules? For example, could AI module add in a link for their donations page (if they had one)?

thejimbirch’s picture

Would we also want to add it to the following?

/composer/Template/LegacyProject/composer.json
/composer/Template/RecommendedProject/composer.json

smustgrave’s picture

Status: Needs review » Needs work

Thanks theJimBirch! Moving to Nw for the feedback

prudloff’s picture

I'm not sure it makes sense on the templates. composer fund only works for dependencies not in the root composer.json.

prudloff’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

needs a rebase

prudloff’s picture

Status: Needs work » Needs review

I rebased the MR.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Small enough don't mind marking. Not sure if it needs product manager sign off or anything.

sivaji_ganesh_jojodae’s picture

While the merge request looks good from a technical perspective, I’m not certain whether this change aligns with the project’s policy.

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

Credited @longwave, @drumm and @hestenet who discussed this in Slack. Left a comment on the MR with the outcome of that conversation.

drumm made their first commit to this issue’s fork.

drumm’s picture

Status: Needs work » Needs review

I’ve updated the URL, so this is ready to go from my point of view.

There is an open question about "type": "community" vs. "other". I think we can just leave it as "other" since that’s documented at https://getcomposer.org/doc/04-schema.md#funding and there wasn’t an explanation for diverging from the documentation.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Agree it’s fine to leave as other. Thanks!

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

There is a failure here in the ComposerIntegrationTest that seems to be down to the lock being out of date

prudloff’s picture

Status: Needs work » Reviewed & tested by the community

I updated the lock.

sivaji_ganesh_jojodae’s picture

Status: Reviewed & tested by the community » Needs work

There is a git conflict in composer.lock file.

prudloff’s picture

Status: Needs work » Reviewed & tested by the community

I rebased the MR.

alexpott’s picture

Re #4 plenty of contrib projects have funding stuff already in their composer.json - https://search.tresbien.tech/search?q=funding%20f%3Acomposer.json&num=50... - the way the funding thing in composer works encourages this. No policy needed.

alexpott’s picture

Version: main » 11.x-dev
Category: Feature request » Task
Status: Reviewed & tested by the community » Fixed

Committed d903091 and pushed to main. Thanks!
Committed 4330e9a and pushed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • alexpott committed 4330e9a0 on 11.x
    task: #3573359 Add funding key to composer.json
    
    By: prudloff
    By:...

  • alexpott committed d9030916 on main
    task: #3573359 Add funding key to composer.json
    
    By: prudloff
    By:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.