- What Laravel versions does baks-dev/wildberries-support support?
- The package is fully compatible with Laravel 10 and 11 due to its PHP 8.4+ requirement. No explicit Laravel version constraints exist, but it aligns with modern Laravel releases. Always verify compatibility if using beta Laravel versions.
- How do I integrate this package with Laravel’s service container?
- The package lacks a built-in Laravel service provider, so you’ll need to manually bind it to the container. Use `app()->bind()` in a service provider or configure it via `config/app.php` for dependency injection. Wrapping it in a facade is also a common approach.
- Does this package support Wildberries webhooks, and how do I use them in Laravel?
- Webhook support isn’t explicitly documented in the latest version, but you can manually handle Wildberries webhooks by listening to their endpoints and dispatching Laravel events. Use `Bus::dispatch()` or `event(new WildberriesWebhookEvent($data))` for integration.
- Are there breaking changes in v7.4.21 compared to v7.4.15?
- The changelog isn’t publicly detailed, but the package maintains backward compatibility with PHP 8.4+. Test critical endpoints (e.g., orders.get, catalog.add) against your existing codebase to confirm no regressions. Method signatures and response formats should remain stable.
- How do I configure API credentials securely using Laravel’s .env?
- While the package doesn’t enforce .env usage, you can manually load credentials from `.env` via `config('services.wildberries')` or `env('WILDBERRIES_API_KEY')`. Store sensitive data in Laravel’s `config/services.php` or use the `config()` helper for centralized access.
- Can I use this package with Laravel’s queues (Horizon) for async Wildberries API calls?
- The package doesn’t natively support queues, but you can wrap its methods in a job class (e.g., `WildberriesOrderSyncJob`) and dispatch them via `dispatch(new WildberriesOrderSyncJob($data))`. This works seamlessly with Laravel’s queue system.
- Are there English documentation or error messages, or is it Russian-only?
- The primary documentation is in Russian, but error messages and API responses from Wildberries are typically in English. For full English support, consider extending the package or using translation middleware like `laravel-localization` for UI messages.
- How do I handle rate limiting with this package in Laravel?
- The package doesn’t include built-in rate limiting, but you can apply Laravel’s `throttle` middleware to your API routes or use Guzzle’s `delay` option. For example, add `middleware('throttle:60,1')` to your Wildberries API routes or configure it in the HTTP client.
- Does this package work with Laravel’s Monolog for logging?
- Yes, you can forward logs to Laravel’s Monolog by configuring the package’s logger to use Laravel’s logging channels. Set the logger in your service provider or use `Log::channel('wildberries')->info('Message')` to route logs through Laravel’s system.
- What alternatives exist for Wildberries API integration in Laravel?
- Alternatives include building a custom Guzzle-based client or using third-party libraries like `wildberries-api-php`. However, this package offers a pre-built solution with tested endpoints, reducing development time. For enterprise needs, consider extending it or using a dedicated SaaS integration like Zapier.