|
1 | 1 | # Breaking change notice for version 15.0.0 |
2 | 2 |
|
| 3 | +## Removal of `LATEST_SUPPORTED_ADMIN_VERSION` and `RELEASE_CANDIDATE_ADMIN_VERSION` constants |
| 4 | + |
| 5 | +The `LATEST_SUPPORTED_ADMIN_VERSION` and `RELEASE_CANDIDATE_ADMIN_VERSION` constants have been removed to prevent semantic versioning (semver) breaking changes. Previously, these constants would automatically update every quarter when new API versions were released, causing unintended breaking changes for apps. |
| 6 | + |
| 7 | +### Migration Guide |
| 8 | + |
| 9 | +**If you were using these constants directly:** |
| 10 | + |
| 11 | +```ruby |
| 12 | +# Before (v14 and earlier) |
| 13 | +api_version = ShopifyAPI::LATEST_SUPPORTED_ADMIN_VERSION |
| 14 | +# or |
| 15 | +api_version = ShopifyAPI::RELEASE_CANDIDATE_ADMIN_VERSION |
| 16 | + |
| 17 | +# After (v15+) |
| 18 | +api_version = "2025-07" # Explicitly specify the version you want to use |
| 19 | +``` |
| 20 | + |
| 21 | +**In your Context.setup:** |
| 22 | + |
| 23 | +The `api_version` parameter has always been required in `Context.setup`, so most apps should not be affected. However, you must now explicitly specify which API version you want to use: |
| 24 | + |
| 25 | +```ruby |
| 26 | +# Before (v14 and earlier) |
| 27 | +ShopifyAPI::Context.setup( |
| 28 | + api_key: "<api-key>", |
| 29 | + api_secret_key: "<api-secret-key>", |
| 30 | + host: "<https://application-host-name.com>", |
| 31 | + scope: "read_orders,read_products,etc", |
| 32 | + is_embedded: true, |
| 33 | + api_version: ShopifyAPI::LATEST_SUPPORTED_ADMIN_VERSION, # This constant no longer exists |
| 34 | + is_private: false, |
| 35 | +) |
| 36 | + |
| 37 | +# After (v15+) |
| 38 | +ShopifyAPI::Context.setup( |
| 39 | + api_key: "<api-key>", |
| 40 | + api_secret_key: "<api-secret-key>", |
| 41 | + host: "<https://application-host-name.com>", |
| 42 | + scope: "read_orders,read_products,etc", |
| 43 | + is_embedded: true, |
| 44 | + api_version: "2025-07", # Explicitly specify the version |
| 45 | + is_private: false, |
| 46 | +) |
| 47 | +``` |
| 48 | + |
| 49 | +**Finding the right API version:** |
| 50 | + |
| 51 | +You can see all supported API versions by referencing: |
| 52 | +```ruby |
| 53 | +ShopifyAPI::SUPPORTED_ADMIN_VERSIONS |
| 54 | +# => ["unstable", "2025-10", "2025-07", "2025-04", ...] |
| 55 | +``` |
| 56 | + |
| 57 | +**Why this change?** |
| 58 | + By requiring explicit version specification, apps can: |
| 59 | +- Control when they upgrade to new API versions |
| 60 | +- Test thoroughly before upgrading |
| 61 | +- Avoid unexpected breaking changes from automatic version updates |
| 62 | + |
3 | 63 | ## Removal of `ShopifyAPI::Webhooks::Handler` |
4 | 64 |
|
5 | 65 | The `ShopifyAPI::Webhooks::Handler` class has been removed in favor of `ShopifyAPI::Webhooks::WebhookHandler`. The `ShopifyAPI::Webhooks::WebhookHandler` class is now the recommended way to handle webhooks. |
|
0 commit comments