- How do I install jeffersongoncalves/laravel-github-client in a Laravel app?
- Install it with Composer using composer require jeffersongoncalves/laravel-github-client. The package supports Laravel auto-discovery, so its service provider and facade are registered without manual wiring. Publish the config file with the vendor:publish command, then set your GitHub token and options in the published config or your .env file.
- Which Laravel and PHP versions does this GitHub client support?
- The package description does not publish its exact version constraints, so check the require section of its composer.json before adopting it. Release v1.1.0 only bumps actions/checkout in CI and does not change runtime code or dependency constraints. Confirm the supported Laravel and PHP ranges match your platform upgrade horizon.
- How do I configure the GitHub personal access token for this package?
- Credentials live in the published config file, which includes the token, base URL, and request options. Store the token in an environment variable rather than committing it, and choose between fine-grained and classic personal access tokens based on the scopes you need. The package sends authenticated requests using that token through Laravel's HTTP client.
- Can I use the facade to call GitHub endpoints such as repositories and issues?
- Yes, the package registers a facade so you can make fluent GitHub API calls without building HTTP clients by hand. It is resolved through Laravel's service container and is intended for repositories, issues, pull requests, users, and other GitHub resources. For maintainability, wrap facade calls behind your own interface instead of injecting the facade into controllers and jobs.
- How do I mock GitHub API calls in tests when using this package?
- Because the client is built on Laravel's HTTP client, you can use Http::fake() to stub GitHub responses in your test suite. Write contract tests against your own interface using recorded HTTP fixtures so a future replacement client can be swapped in without rewriting tests. Avoid asserting on facade internals and focus on the requests and responses your application depends on.
- Does this Laravel GitHub client handle rate limits, retries, and backoff?
- The package overview does not document retry or backoff behavior, so inspect the source before relying on it in production. GitHub allows roughly 5,000 authenticated requests per hour and 60 unauthenticated, with secondary rate limits that can return 403 or 429 responses. If the package surfaces raw HTTP exceptions, add your own retry and backoff layer around the client.
- Is jeffersongoncalves/laravel-github-client actively maintained?
- The latest release, v1.1.0, contains only a Dependabot bump of actions/checkout from v6 to v7, with no source or API changes. That suggests release activity is currently driven by automated dependency hygiene rather than feature development. As a single-maintainer community package, it carries bus-factor risk, so design your integration with an exit path.
- How does this package compare with Saloon or knplabs/github-api?
- This package is a lightweight Laravel wrapper around the GitHub API with a config file and facade, which makes it a quick fit for small, scoped integrations. Saloon is a general-purpose HTTP connector framework where you define your own GitHub connector and have more control over retries, pagination, and testing. knplabs/github-api offers broader GitHub API coverage but is not as Laravel-native. Choose based on how much API surface and transport control you need.
- Does the package support GitHub App authentication or only personal access tokens?
- The documented authentication method is personal access tokens for authenticated requests. GitHub App installation tokens are not mentioned in the overview, so multi-tenant setups would need to generate and rotate installation tokens yourself and feed them into the client configuration. Confirm support in the source if App auth is a hard requirement.
- How should I structure production code so I am not coupled to this GitHub client?
- Define an internal interface in your domain namespace for the GitHub operations you actually need, such as reading repositories, opening issues, and listing pull requests. Implement that interface with this package inside an Infrastructure/GitHub namespace, bind it in a service provider, and inject the interface rather than the facade into controllers and jobs. Keep the first slice to two or three operations and add contract tests with recorded HTTP fixtures so you can replace the client later.