# KnpLabs/php-github-api

A simple PHP GitHub API client, Object Oriented, tested and documented.

Repository: https://github.com/KnpLabs/php-github-api
Canonical: https://ross.abutalabs.com/products/php-github-api
Language: PHP
License: MIT
License Family: permissive
Topics: php, github-api, hacktoberfest
Last push: 2026-08-18T07:59:10+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 66, longevity 100
- inputs: {"age_days": 5262, "days_push": 15, "days_rel": 15, "gap_med": 346.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2207, forks 587 (observed 2026-08-28T04:06:26.078686+00:00)

## What it is
An object-oriented PHP wrapper for the GitHub REST (v3) and GraphQL (v4) APIs, built on PSR-18 HTTP clients via HTTPlug. It is extensively tested, documented, and installable through Composer.

## Use cases
- list a user's repositories from a PHP app
- create issues and pull requests programmatically via the GitHub API
- authenticate with GitHub tokens and call API endpoints
- query the GitHub GraphQL API v4 from PHP
- cache GitHub API responses with a PSR-6 cache pool
- integrate GitHub data into a Laravel application

## When to choose
- you need to interact with the GitHub API from PHP 7.2+
- you want a decoupled client that works with any PSR-18 HTTP client
- you want a mature, tested, MIT-licensed library with framework integrations

## When to avoid
- you are not working in PHP
- you need a generic REST client rather than GitHub-specific endpoints
- you need GitHub API features not yet covered by the wrapper

## Facets
- artifact type: library
- maturity: stable
- function: http-client, sdk
- domain: developer-tools, apis, version-control
- platform: php
- tags: github-api, rest-client, api-wrapper, httplug, composer

## Member repositories
- KnpLabs/php-github-api (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:26.078686+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:46:27.813215+00:00, confidence not recorded.
  - readme: https://github.com/KnpLabs/php-github-api (fetched 2026-08-28T04:06:26.078686+00:00, sha b7f4d154061d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
