Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Gitee Api Bundle Laravel Package

tourze/gitee-api-bundle

A Symfony bundle that integrates the Gitee API, wiring up configuration and services so PHP applications can quickly authenticate and call Gitee endpoints for repositories, issues, users, and more without building a client from scratch.

View on GitHub
Deep Wiki
Context7

Getting Started

Treat 0.0.1 as a source-first, pre-1.0 package — the release note is empty, so the code and composer.json are your only documentation.

  • Install: composer require tourze/gitee-api-bundle then inspect what actually landed:
    • composer.json for PHP constraint, symfony/http-client, and autoload namespaces.
    • src/ for the core client class/interface (typically a …Api or …Client wrapping Gitee REST endpoints).
    • DependencyInjection/ and Resources/config/ for the Symfony service wiring.
  • Where to look first: the interface the client implements (that's your testable seam) and any YAML/PHP service definition (that reveals the intended base URL, auth method, and transport).
  • First use case: authenticate with a Gitee personal access token and perform one read (GET /user or fetch a repo), then one write (create an issue). Instantiate the client manually rather than relying on framework autoconfiguration — see the gotcha below.
// Laravel: wire it yourself; Symfony bundle autodiscovery does not apply.
$token  = config('services.gitee.token');
$client = new \Tourze\GiteeApiBundle\...\Client($token, /* transport/base uri if injectable */);

Implementation Patterns

  • Bind a singleton in a service provider. Register the client (and its interface) in App\Providers\AppServiceProvider from a config/gitee.php file, reading GITEE_TOKEN from env(). This gives you one configured instance and a mockable interface.
  • Keep credentials out of the bundle's config. The Symfony bundle expects parameters via its DI extension; in Laravel, own the config array yourself and pass values into the constructor.
  • Wrap calls in queued jobs. Gitee API work (issue sync, webhook handling, repo mirroring) is I/O-bound and rate-limited — dispatch jobs, retry with backoff, and log failures.
  • Adapt the transport if needed. If the client accepts an injected HTTP client, pass a PSR-18/Symfony adapter and use Laravel's Http::fake()-style testing at the boundary; otherwise mock the client interface in tests.
  • Webhook + pull sync pattern: receive Gitee webhooks into a controller, validate the signature, persist an event row, and reconcile via the API client in a job. This is the highest-value day-to-day integration.

Gotchas and Tips

  • It's a Symfony bundle, not a Laravel package. No extra.laravel providers, no package discovery. You will manually construct services and skip the DependencyInjection extension. Budget time for this.
  • 0.0.1 means no compatibility promise. Pin the exact version ("tourze/gitee-api-bundle": "0.0.1") until a stable tag; expect class/namespace churn.
  • The release note carries zero information. Don't infer features from it — read src/. There is no documented changelog, breaking-change list, or deprecation path yet.
  • Auth method ambiguity. Gitee accepts either an access_token query parameter or an Authorization: token … header depending on endpoint/version. Confirm which the package sends before debugging 401s.
  • Rate limiting and network locality. Gitee is hosted in China; set explicit connect/read timeouts and add caching for read-heavy endpoints. Treat 429s as expected and retry.
  • Extension points to inspect: the client interface (for decoration/mocking) and the transport injection point (for swapping in Symfony HttpClient or a Laravel-friendly adapter). These are where you'll actually add resilience.
  • Debugging tip: enable Symfony HttpClient logging or wrap the client in a decorator that logs request/response pairs — there is no built-in debugging layer documented at this stage.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect