- Can I use baks-dev/avito-products in a Laravel project without Symfony conflicts?
- No, this package is a Symfony bundle and introduces Doctrine, Twig, and autowiring, which conflict with Laravel’s Eloquent and Blade. Use Laravel’s Http client for API-only access or isolate it in a microservice to avoid dependency hell.
- What Laravel versions does baks-dev/avito-products support?
- The package itself doesn’t explicitly declare Laravel compatibility—it’s a Symfony bundle. It requires PHP 8.4+ but lacks Laravel-specific integrations, so it may not work with any Laravel version without manual bridging.
- How do I authenticate with Avito’s API using this package?
- The package likely handles OAuth2 or API keys internally, but since it’s Symfony-based, you may need to configure it via Symfony’s dependency injection. For Laravel, use `Http::withHeaders()` with your Avito token instead for a native solution.
- Are there Laravel-native alternatives to baks-dev/avito-products?
- Yes. For marketplace listings, use `spatie/laravel-medialibrary` for media handling and build a custom Avito API client with GuzzleHttp. For search, pair it with Laravel Scout and Elasticsearch.
- Does this package support real-time Avito webhooks?
- Unlikely. The package’s Symfony architecture doesn’t integrate with Laravel’s queue system or event listeners natively. For webhooks, use Laravel’s `queue:work` with a custom Guzzle-based listener instead.
- How do I test this package in a Laravel project?
- Run `phpunit --group=avito-products` as per the README, but tests may fail due to Symfony-Laravel incompatibilities. For Laravel-specific testing, mock the Avito API responses using Laravel’s HTTP tests or PestPHP.
- Will this package work with Laravel’s Scout for search?
- No. The package relies on Symfony’s Doctrine, which conflicts with Scout’s Eloquent-based search. Use Scout directly with a custom Avito API client for search functionality in Laravel.
- Is there Blade template support for Avito product listings?
- No. The package uses Twig (Symfony’s templating engine), which won’t work with Laravel’s Blade. Build Blade views manually or use API-only mode to fetch and display data in Laravel’s native templates.
- How do I handle rate limiting with this package?
- The package may not include built-in retry logic for Avito’s rate limits. Use Laravel’s `Http::timeout()` and `retry()` methods or queue failed requests with `queue:work` for resilience.
- What’s the best way to migrate away from this package if needed?
- Replace it with a custom Laravel Avito client using GuzzleHttp for API calls, Laravel Queues for async processing, and Eloquent models for local storage. Start with a pilot integration (e.g., product listings) to compare performance and maintainability.