- What Laravel versions does baks-dev/wildberries-package support?
- The package requires PHP 8.4+ and is designed for modern Laravel versions (8.x, 9.x, 10.x, and 11.x). It leverages Laravel’s service providers, Artisan commands, and Doctrine migrations, so ensure your Laravel installation aligns with these requirements. Check the package’s `composer.json` for strict version constraints.
- How do I install and configure the package for production?
- Run `composer require baks-dev/wildberries-package`, then execute `php artisan baks:assets:install` to set up config files and resources. Run Doctrine migrations with `php artisan doctrine:migrations:migrate` to update your database schema. Verify your `config/wildberries.php` matches your Wildberries API credentials and environment settings.
- Does this package handle Wildberries API authentication automatically?
- Yes, the package includes built-in support for Wildberries API authentication (OAuth 2.0 or API keys). Configure your credentials in `config/wildberries.php` under the `api` section. The package abstracts token management and retry logic for failed requests, but you may need to extend it for custom authentication flows.
- Can I use this package with existing Laravel order/shipping models?
- The package introduces its own entities (e.g., `WildberriesOrder`, `WildberriesShipment`) via Doctrine migrations. To avoid conflicts, either extend these models or map them to your existing order/shipping tables using custom logic. Review the migrations to understand schema changes before integrating.
- How do I test the package in a staging environment?
- Run PHPUnit tests with the group flag: `php bin/phpunit --group=wildberries-package`. Mock the Wildberries API responses using Laravel’s HTTP testing tools or a service like VCR. Ensure your staging database matches the package’s expected schema by running migrations first.
- What if the Wildberries API changes or deprecates endpoints?
- The package abstracts API calls but may require updates if Wildberries deprecates endpoints. Monitor the package’s changelog and Wildberries’ API documentation. For critical paths, implement an adapter pattern (e.g., a `WildberriesApiClient` interface) to isolate API logic and ease future updates.
- Are there alternatives to this package for Wildberries integration?
- Alternatives include Wildberries’ official PHP SDK or community packages like `spatie/wildberries-api`. Compare features like order packaging, webhook support, and Doctrine integration. This package stands out for its Laravel-native approach (Artisan commands, migrations) and PHPUnit test coverage, but evaluate whether you need broader e-commerce features.
- How do I handle webhooks from Wildberries for order updates?
- The package does not include built-in webhook handling, but you can extend it by listening to Laravel events or creating a custom route for Wildberries’ webhook endpoints. Validate payloads using Wildberries’ API documentation and update your database or order statuses accordingly. Consider rate-limiting and retry logic for failed webhook deliveries.
- Will this package work with multi-carrier shipping systems?
- This package is specialized for Wildberries and does not natively support multi-carrier workflows. For multi-carrier setups, you’ll need to extend the package or integrate it with a shipping abstraction layer (e.g., a `ShipmentService` interface). Review the package’s architecture to identify extension points for carrier-agnostic logic.
- How do I contribute or report issues with the package?
- Check the package’s GitHub repository for open issues or create a new one with clear reproduction steps. Contributions are welcome via pull requests, especially for missing features or Laravel compatibility fixes. The package uses MIT License, so ensure your contributions align with its terms. Monitor the repo for community activity or fork it if maintenance is slow.