- Can I use this bundle directly in Laravel, or is it strictly for Symfony?
- This bundle is designed for Symfony and requires manual adaptation for Laravel. You’ll need to register its services (like `PUDOList`) in Laravel’s container via `AppServiceProvider` and handle Symfony-specific dependencies like `KernelInterface` with workarounds. The core API logic (Guzzle-based HTTP calls) remains usable.
- What Laravel versions does this bundle support?
- The bundle itself supports PHP 8.4+, which aligns with Laravel 10+ (latest LTS). However, its Symfony dependencies mean you’ll need to manually bridge services—no native Laravel version lock exists. Test thoroughly with your Laravel version to ensure compatibility.
- How do I configure API credentials in Laravel?
- Replace the Symfony YAML config with Laravel’s `.env` or `config/dpd.php`. Use `env('DPD_API_KEY')` and `env('DPD_API_URL')` in your `ConfigProvider` binding. Example: `'key' => env('DPD_API_KEY'), 'url' => env('DPD_API_URL', 'https://mypudo.dpd.com.pl/api/pudo/')`.
- Does the bundle support streaming pickup points for large datasets?
- Yes, the `PUDOListStreaming` service streams pickup points one-by-one to reduce memory usage. In Laravel, bind this service to your container and use it like any other dependency-injected class. No additional setup is needed beyond the manual service registration.
- What happens if the DPD API fails or returns invalid data?
- The bundle uses Guzzle under the hood, which throws exceptions for HTTP errors (e.g., 4xx/5xx). For invalid responses, check the `PUDO` value objects for validation errors. Add retry logic (e.g., Laravel’s `retry()` helper) or implement custom error handling in your service layer.
- Is there a simpler alternative for Laravel without Symfony dependencies?
- Yes, you could use Guzzle directly with Laravel’s HTTP client facade (`Http::get()`) to call DPD’s API endpoints. This avoids Symfony dependencies but requires manual request/response handling. The bundle’s abstraction (e.g., `PUDO` objects) may not be replicated without extra code.
- How do I extend the bundle for custom features (e.g., webhooks)?
- The bundle’s codebase is modular, but its Symfony-centric design may limit extensibility. Fork the repository and adapt it for Laravel, or create a separate Laravel package that wraps the bundle’s services. Contribute upstream if you need shared features, but expect minimal community support.
- Are there known issues with rate limiting or API quotas?
- The bundle doesn’t include built-in rate-limiting logic. Monitor DPD’s API documentation for quota limits and implement retries with exponential backoff in your Laravel service layer. Use Guzzle’s middleware or Laravel’s `retry()` helper for resilience.
- How do I test this bundle in a Laravel application?
- Mock the `PUDOList` and `PUDOListStreaming` services in your tests using Laravel’s mocking tools. Example: `$this->mock(PUDOList::class)->shouldReceive('getAll')->andReturn([new PUDO()]);`. Test edge cases like API timeouts by throwing exceptions in mocks.
- What’s the long-term maintenance risk of using this bundle?
- The bundle has no active community (0 stars, 0 dependents) and last saw updates in 2026. While it’s functional, breaking changes (e.g., API schema updates) may require manual fixes. Consider forking or building a lightweight Laravel wrapper if sustainability is a concern.