atomicptr/flysystem-github-storage

A Github based filesystem for Flysystem.

Fund package maintenance!
atomicptr
Buy Me A Coffee

Installs: 199

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/atomicptr/flysystem-github-storage

v0.1.4 2024-09-19 15:47 UTC

This package is auto-updated.

Last update: 2025-10-18 21:23:01 UTC


README

A GitHub based filesystem for Flysystem, powered by php-github-api.

Note: Keep in mind that GitHub has a rate limit, so if you need a lot of file operations you might need something else.

Inspired by @RoyVoetman/flysystem-gitlab-storage.

Usage

<?php

use Atomicptr\FlysystemGithub\GithubAdapter;
use Atomicptr\FlysystemGithub\Credentials;
use Atomicptr\FlysystemGithub\Committer;
use League\Flysystem\Filesystem;

$adapter = new GithubAdapter(
    "username",
    "repository",
    branch: "master",
    credentials: Credentials::fromToken("token..."),
    committer: new Committer("Peter Developer", "peter@developer.tld"),
);

$filesystem = new Filesystem($adapter);

// see http://flysystem.thephpleague.com/api/ for full list of available functionality

Laravel

Check out my other repository: atomicptr/laravel-github-storage

License

MIT