Download the PHP package tomatophp/filament-cms-github without Composer

On this page you can find all versions of the php package tomatophp/filament-cms-github. 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 filament-cms-github

Screenshot

Filament CMS GitHub Integration

Latest Stable Version License Downloads Dependabot Updates PHP Code Styling Tests

GitHub integration for TomatoPHP CMS that automatically imports and synchronizes GitHub repository documentation (README files) as posts in your CMS. Perfect for maintaining documentation sites, portfolio showcases, or open-source project listings.

Screenshot

Import Action

Features

Installation

Install the package via composer:

Run the installation command:

Register the plugin in your Filament panel provider (/app/Providers/Filament/AdminPanelProvider.php):

Requirements

Configuration

Queue Setup

This package dispatches jobs to the queue for better performance. Make sure your queue is configured:

Post Type Configuration

Imported repositories are saved as posts with type open-source. You can customize this in your CMS configuration.

Usage

Import Single Repository

  1. Navigate to your CMS Posts page in Filament
  2. Click the "Github Import" action button
  3. Enter repository URL(s) and redirect path(s)
  4. Click submit

Example:

Import Multiple Repositories

You can import multiple repositories at once:

Refresh All Repositories

To update all previously imported repositories with latest data:

  1. Use the "Refresh Github Links" action
  2. All posts with type = 'open-source' and a meta_url will be updated

Programmatic Usage

Import Repository

Refresh Existing Post

Refresh All Posts

API Reference

GitHubService

The main service class for GitHub operations.

extractRepoFromUrl(string $url): string

Extracts repository name from GitHub URL.

fetchRepoData(string $repo): ?array

Fetches repository data from GitHub API.

fetchReadme(string $repo, string $branch = 'main'): ?string

Fetches README content from repository.

fetchPackagistData(string $packageName): ?array

Fetches package data from Packagist.

importRepository(string $url, ?int $userId = null, ?string $userType = null): ?Post

Imports a complete repository as a post.

refreshPost(Post $post): bool

Refreshes an existing post with latest GitHub data.

refreshAllPosts(): int

Refreshes all posts of type 'open-source' with meta_url.

Filament Actions

GithubImportAction

Provides a Filament action for importing repositories.

GithubRefreshAction

Provides a Filament action for refreshing all repositories.

Data Structure

Post Fields

Imported repositories are saved with the following structure:

Meta Fields

GitHub statistics are stored as meta fields:

Accessing Meta Fields

Jobs

GitHubMetaGetterJob

Handles importing a single repository in the background.

GitHubMetaRefreshJob

Handles refreshing all repositories in the background.

Events

The package dispatches the following events:

Notifications

Users receive notifications for:

Testing

The package includes comprehensive test coverage:

Test Structure

Publish Assets

Config File

Views

Translations

Migrations

Troubleshooting

Queue Not Processing

Make sure your queue worker is running:

For development, you can use sync driver in .env:

GitHub API Rate Limits

GitHub API has rate limits. For authenticated requests (recommended), generate a personal access token and configure it in your application.

README Not Found

The package tries multiple branch names automatically:

If README is not found, the post will be created with empty body content.

Advanced Usage

Custom Post Processing

You can listen to the PostCreated event to perform custom processing:

Custom Notification Handling

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Development Setup

Testing

if you like to run PEST testing just use this command

Code Style

if you like to fix the code style, just use this command

PHPStan

if you like to check the code by PHPStan just use this command

Other Filament Packages

Check out our Awesome TomatoPHP


All versions of filament-cms-github with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3|^8.4
tomatophp/console-helpers Version ^1.1
tomatophp/filament-cms Version ^4.0
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 tomatophp/filament-cms-github contains the following files

Loading the files please wait ...