gnikyt/basic-shopify-api
Tested Shopify API wrapper for PHP using Guzzle. Supports REST and GraphQL (sync/async), OAuth and private apps, rate limiting, retries, pagination, and helpers for install/authorize URLs, HMAC validation, call limits, middleware, and storage.
iterable signature) align with modern PHP standards, reducing type-related bugs in Laravel 10/11. This is critical for long-term maintainability and avoids deprecation warnings.iterable return type fix ensures type safety and eliminates runtime errors.iterable vs. array), improving developer experience and code reliability.429 errors), requiring custom implementation.ShopifyApiException) may still be needed for granular error handling.ShopifyApi::class) with PHP 8.1’s constructor property promotion. Example:
$this->app->singleton(ShopifyApi::class, function ($app) {
return new ShopifyApi(config('shopify.api_key'), config('shopify.store_url'));
});
Shopify facade for cleaner syntax (e.g., Shopify::products()->create()). This improves developer experience but adds minor complexity.graphql-php for advanced queries (e.g., fragments, persisted queries). The documentation fix (#128) makes this easier but does not provide implementation support.OrderCreated). However, HMAC validation and retry logic will need to be implemented separately.iterable returns) in a staging environment with Laravel 10/11.GET /products). Focus on type safety and error handling.throttle) to handle Shopify’s API limits.?api_version=2024-07 in requests to avoid deprecated endpoints.| Phase | Task | Owner | Dependencies |
|---|---|---|---|
| Discovery | Audit Shopify API requirements (REST/GraphQL endpoints). | Backend/TPM | Shopify docs |
| Setup | Install package, configure .env (API keys, store URL). |
DevOps/Backend | Shopify developer account |
| Core CRUD | Implement product/order CRUD via REST (validate PHP 8.1 types). | Backend | Package tests |
| GraphQL | Test private GraphQL calls (e.g., staff accounts) using sandbox. | Backend | Shopify GraphQL schema |
| Webhooks | Set up webhook endpoints + HMAC validation (Laravel middleware). | Backend | Shopify admin setup |
| Rate Limiting | Implement exponential backoff for 429 errors. |
Backend | Guzzle middleware |
| Testing | Unit/integration tests for critical paths (e.g., order fulfillment). | QA/Backend | Test data (sandbox) |
| Monitoring | Add logging/alerts for API failures (e.g., rate limits). | DevOps | Laravel monitoring tools |
| **F |
How can I help you explore Laravel packages today?