- Can I use this package directly in Laravel without modifying the code?
- Yes, the package integrates seamlessly with Laravel’s HTTP client (Guzzle) via a compatibility layer, though you may need to replace its deprecated Buzz dependency. You can inject the Bitbucket client into Laravel’s service container for clean dependency management.
- Does this package support Laravel’s authentication systems like Passport or Sanctum?
- Indirectly. The package supports OAuth 2.0, Basic Auth, and App Passwords, which you can abstract into Laravel’s authentication services (e.g., Passport). Store tokens securely using Laravel’s built-in encryption or Sanctum’s token system.
- What Laravel versions are compatible with this package?
- The package requires PHP 5.4+, but Laravel typically runs on PHP 8.x. Use tools like Rector to upgrade syntax or create polyfills to avoid deprecation warnings. Test thoroughly, as some Laravel features may not align perfectly with older PHP versions.
- How do I handle Bitbucket webhooks with this package?
- This package doesn’t natively support webhooks, but you can integrate them using Laravel’s HTTP routes or a package like `spatie/laravel-webhooks`. Create a Laravel endpoint to receive webhook payloads and process them asynchronously with queues.
- Are there any known issues with the Bitbucket API v2.0 endpoints?
- The package explicitly supports Bitbucket API v2.0, but some endpoints (e.g., `changesets/likes`) may be missing or deprecated. Check the [documentation](https://gentlero.bitbucket.io/bitbucket-api/) for coverage details and plan for custom middleware if critical endpoints are unsupported.
- Is this package actively maintained? Should I use it in production?
- The package is archived, meaning no new features or bug fixes will be added. Use it cautiously in production, especially if Bitbucket’s API evolves. Monitor for breaking changes and consider forking or maintaining a custom branch if needed.
- How do I cache Bitbucket API responses in Laravel?
- Leverage Laravel’s caching mechanisms (e.g., `Cache::remember`) to store Bitbucket API responses like repository metadata. This reduces API calls and improves performance, especially for read-heavy operations.
- Can I use this package alongside Laravel’s Eloquent for data persistence?
- No, the package doesn’t integrate with Eloquent. However, you can manually sync Bitbucket data (e.g., issues, commits) into your database using Eloquent models or Laravel’s query builder for custom storage and retrieval.
- What are the alternatives to this package for Laravel?
- Consider `atlassian-php-sdk` (official Atlassian SDK) for broader Bitbucket/Jira support, or use Guzzle directly for lightweight, custom API interactions. If you need webhooks, `spatie/laravel-webhooks` pairs well with either approach.
- How do I handle rate limiting with this package in Laravel?
- Implement Laravel middleware with exponential backoff to handle Bitbucket’s rate limits. Use Guzzle’s built-in retry logic or create a custom HTTP client wrapper to manage retries and delays gracefully.