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

Add configuration option to disable fund message #11774

Closed
wants to merge 3 commits into from

Conversation

samlitowitz
Copy link
Contributor

Add a configuration option to disable the fund message addressing #11765

src/Composer/Config.php Outdated Show resolved Hide resolved
src/Composer/Installer.php Outdated Show resolved Hide resolved
@samlitowitz
Copy link
Contributor Author

@Seldaek for visibility because you commented on the originating issue #11765

Comment on lines +40 to +42
"config": {
"fund": false
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Seldaek said that this should be an environment variable, not a configuration option. Can you help us understand why you have decided to make this a configuration option anyway?

Ref: #11765 (comment)

there could be an env var to turn this off if anything, I don't think flags or config option makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredden
I think the ability to "set it and forget it" across multiple environments provides an ease of use which is valuable to those who would use this option and a configuration option seems like the best method to do so.

I think the ability to temporarily or individually set this is also very helpful and an environmental variable would solve this. I do think that adding support for the environmental variable should be treated as a different "feature" done under a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the use-case for "don't show me the funding options" is where an individual chooses to not see the messages, rather than a project deciding this on behalf of its users.

With an environment variable, a user can "set and forget" a system-level environment variable on their machine. This then has a consistent experience for that user across all projects with which they interact.

With a per-project configuration variable (as proposed in this pull request), a /project/ makes the decision to not fund its dependencies. If a library makes this choice, then contributors to the library won't know about any dependencies which would benefit from funding.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With an environment variable, a user can "set and forget" a system-level environment variable on their machine. This then has a consistent experience for that user across all projects with which they interact.

Absolutely, I think an environmental variable would be very useful. To my mind it is a related but separate piece of work to be done in a different PR. I believe it probably should be done even if this change is not accepted and definitely be done if this change is accepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredden As an update to this conversation, I have made another PR (#11779 ) which adds support for an environmental variable to show/hide the funding message.

@fredden
Copy link
Contributor

fredden commented Dec 27, 2023

Thinking about this a little more, I suggest that a simple boolean isn't the right approach here. What are your thoughts on a list of packages to ignore the funding requests/messages for instead? This way when a new dependency is added then it's an explicit choice to not fund that new dependency, rather than an implicit "we do not fund anything" choice. This feels more in keeping with the (assumed) intent: to increase funding of open-source software.

@samlitowitz
Copy link
Contributor Author

Thinking about this a little more, I suggest that a simple boolean isn't the right approach here. What are your thoughts on a list of packages to ignore the funding requests/messages for instead? This way when a new dependency is added then it's an explicit choice to not fund that new dependency, rather than an implicit "we do not fund anything" choice. This feels more in keeping with the (assumed) intent: to increase funding of open-source software.

To me this seems like another useful feature which gives library/projects a more granular option in addition to the all or none model. I think it would be great as an addition to this current work. My concern with using it as a replacement for the fund option is that it would not be inline with the original ask and would likely be so cumbersome to use for that case as to be unusable.

Having the fund option default to true means a library/project would have to make an explicit choice to hide funding messages. I believe that the majority of libraries and projects will retain the default value to support open source work.

@Seldaek
Copy link
Member

Seldaek commented Jan 8, 2024

Thanks for the PR but IMO the env var in #11779 is more than enough. And for the record having the option to ignore by name etc seems way overkill to me.

@Seldaek Seldaek closed this Jan 8, 2024
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

Successfully merging this pull request may close these issues.

None yet

5 participants