Download the PHP package fof/github-sponsors without Composer

On this page you can find all versions of the php package fof/github-sponsors. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package github-sponsors

GitHub Sponsors by FriendsOfFlarum

License Latest Stable Version OpenCollective Donate

A Flarum extension that automatically synchronizes your GitHub Sponsors with Flarum user groups.

Features

How It Works

This extension connects your GitHub Sponsors program with your Flarum forum by:

  1. Fetching Sponsors: Queries GitHub's GraphQL API to retrieve your current sponsors
  2. Matching Users: Identifies Flarum users by matching:
    • Email addresses from GitHub sponsors with Flarum user emails
    • GitHub OAuth provider IDs for users who logged in via GitHub
  3. Managing Groups: Automatically adds sponsors to a designated Flarum group and removes users who are no longer sponsors
  4. Tracking Changes: Logs all additions and removals to help you monitor the process

Installation

Install with composer:

Required: Flarum Scheduler

This extension requires Flarum's scheduler to be set up and running. The extension will automatically check for sponsor updates every hour.

Configuration

After installation, configure the extension in your Flarum admin panel:

1. Create a GitHub Personal Access Token

  1. Go to GitHub Settings > Tokens
  2. Click "Generate new token (classic)"
  3. Give it a descriptive name (e.g., "Flarum Sponsors Sync")
  4. Select the following scopes:
    • read:user - Read user profile data
    • user:email - Read the user email address
    • read:org - Read organization membership (if syncing an organization)
  5. Click "Generate token" and copy it

2. Configure the Extension

In your Flarum admin panel, navigate to the GitHub Sponsors extension settings:

Save the settings, and the extension will start syncing on the next scheduled run.

Usage

Once configured, the extension runs automatically every hour. You can also manually trigger an update:

Command Options

Dry-Run Mode

Preview what changes would be made without actually applying them:

This is useful for testing your configuration before letting the extension make real changes to your groups.

Verbose Output

Get detailed information about the synchronization process:

Verbose mode shows:

Combine both options for detailed preview:

Viewing Logs

Check the synchronization logs:

Log output includes:

How User Matching Works

The extension uses two methods to match GitHub sponsors to Flarum users:

  1. Email Matching: Direct comparison of sponsor email from GitHub with Flarum user emails
  2. OAuth Matching: For users who logged in via GitHub, matches their GitHub ID with sponsor IDs

This dual approach maximizes the chance of correctly identifying your sponsors.

Important Notes

For Developers: Event System

This extension dispatches events when sponsors are added or removed, allowing other extensions to react to these changes.

Available Events

FoF\GitHubSponsors\Event\SponsorAdded

Dispatched when a user is added to the sponsors group.

Properties:

Example listener:

FoF\GitHubSponsors\Event\SponsorRemoved

Dispatched when a user is removed from the sponsors group (sponsorship ended).

Properties:

Example listener:

Notes on Events

Troubleshooting

No sponsors are being synced

Some sponsors aren't being matched

Updating

OpenCollective GitHub

An extension by FriendsOfFlarum.


All versions of github-sponsors with dependencies

PHP Build Version
Package Version
Requires flarum/core Version ^2.0.0
guzzlehttp/guzzle Version ^7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fof/github-sponsors contains the following files

Loading the files please wait ...