Releases: shopware/app-php-sdk
Releases · shopware/app-php-sdk
Release list
5.2.0
Upgrade Notes (5.2.0)
- Uninstall may now keep the shop.
AppLifecycle::delete()respects theapp.deletedkeepUserDataflag and no longer deletes the shop when it'strue. If you relied on uninstall always removing the shop, branch onShopDeletedEvent::keepUserData()/BeforeShopDeletionEvent::keepUserData(). - Corrupt
app.deletedbodies now throw. An invalid-JSON webhook body raisesMalformedWebhookBodyExceptioninstead of silently deleting the shop — make sure your handler doesn't treat that as a normal delete. - New dependency
psr/log(^1.0 || ^2.0 || ^3.0), pulled in automatically.
No breaking API changes.
What's Changed
- fix: array access with null deprecation by Michel (@cyl3x) in #67
- fix: respect keepUserData on app uninstall by Ghaith (@Gaitholabi) in #64
- feat: improve observability for the app registration flow by adding structured logs by Leon Beckamp (@leonbeckamp) in #60
New Contributors
- Leon Beckamp (@leonbeckamp) made their first contribution in #60
Full Changelog: 5.1.4...5.2.0
5.1.4
What's Changed
- fix: array_flip with malformed request by Michel (@cyl3x) in #65
Full Changelog: 5.1.3...5.1.4
5.1.3
What's Changed
- fix: strip tailing url slashes by Michel (@cyl3x) in #62
- fix: deny empty shop parameters on registration by Michel (@cyl3x) in #63
Full Changelog: 5.1.2...5.2.0
5.1.2
What's Changed
- feat: add getLanguage() to Order context to fetch locale info from the order by Dang Nguyen (@socrec) in #61
New Contributors
- Dang Nguyen (@socrec) made their first contribution in #61
Full Changelog: 5.1.1...5.1.2
5.1.1
What's Changed
- feat: expose customerId on OrderCustomer by Chuc Le (@untilu29) in #59
Full Changelog: 5.1.0...5.1.1
5.1.0
What's Changed
- feat: Added new isset method for ArrayStruct by Fabian Boensch (@En0Ma1259) in #58
New Contributors
- Fabian Boensch (@En0Ma1259) made their first contribution in #58
Full Changelog: 5.0.3...5.1.0
5.0.3
What's Changed
- test: improve infection coverage by Max Stegmeyer (@mstegmeyer) in #55
- feat: getters for exception parameters by Michel (@cyl3x) in #54
- fix: testing with integer values by Max Stegmeyer (@mstegmeyer) in #56
- fix: missing shippingLocation in salesChannelContext by Max Stegmeyer (@mstegmeyer) in #57
Full Changelog: 5.0.2...5.0.3
5.0.2
What's Changed
- fix: flow action resolving by Max Stegmeyer (@mstegmeyer) in #53
Full Changelog: 5.0.1...5.0.2
5.0.1
What's Changed
- fix: add missing recurring data to recurring action by Max Stegmeyer (@mstegmeyer) in #52
Full Changelog: 5.0.0...5.0.1
5.0.0
Highlights
- Introduce the dual signature verification mechanism to enhance security during shop secret rotations.
- Public API updates in registration verification and shop model that require consumer changes.
Breaking change
RequestVerifierpublic API updated to accept raw secrets and addsauthenticateRegistrationRequestWithShopSignature.ResponseSigner::getRegistrationSignaturenow expects proof parameters array.ShopInterfaceexpanded with required getters/setters for pending/previous secrets, rotation time, and registration confirmation.AppConfigurationconstructor addsenforceDoubleSignature(defaultfalse);enforceDoubleSignature()is deprecated.
Upgrade Notes
Public API changes
AppConfiguration
- New constructor parameter:
bool $enforceDoubleSignature = false enforceDoubleSignature()is also deprecated (scheduled removal in v6.0.0). Should become always enforced.
RequestVerifier
authenticateRegistrationRequest(RequestInterface, AppConfiguration)→
authenticateRegistrationRequest(RequestInterface, string $appSecret)- New:
authenticateRegistrationRequestWithShopSignature(RequestInterface, string $shopSecret) authenticatePostRequest(RequestInterface, ShopInterface)→
authenticatePostRequest(RequestInterface, string $secret, string $headerName = 'shopware-shop-signature')authenticateGetRequest(RequestInterface, ShopInterface)→
authenticateGetRequest(RequestInterface, string $secret)authenticateStorefrontRequest(RequestInterface, ShopInterface)→
authenticateStorefrontRequest(RequestInterface, string $shopId, string $secret)
ResponseSigner
getRegistrationSignature(AppConfiguration, ShopInterface)→
getRegistrationSignature(AppConfiguration, array $proofParameters)with keysshop-id,shop-url
ShopInterface (new required methods)
getPendingShopUrl,setPendingShopUrlgetPendingShopSecret,setPendingShopSecretgetPreviousShopSecret,setPreviousShopSecretsetShopSecretgetSecretsRotatedAt,setSecretsRotatedAtisRegistrationConfirmed,setRegistrationConfirmedhasVerifiedWithDoubleSignature,setVerifiedWithDoubleSignature(deprecated)
Recommendations
- Replace direct usage of
RequestVerifierwithDualSignatureRequestVerifierto enable in-flight support during secret rotation windows.
Required code changes
- Update your
ShopInterfaceimplementation
- Add the new fields and methods listed above.
- Update any storage/persistence you own
- Persist the new fields your
ShopInterfacenow exposes. - Example: add columns for
pending_shop_secret,pending_shop_url,previous_shop_secret,secrets_rotated_at,registration_confirmed, andhas_verified_with_double_signatureto your shop table.
- Update calls to
RequestVerifier
$verifier = new RequestVerifier();
$verifier->authenticateRegistrationRequest($request, $appSecret);
$verifier->authenticateRegistrationRequestWithShopSignature($request, $shopSecret);
$verifier->authenticatePostRequest($request, $shopSecret);
$verifier->authenticateGetRequest($request, $shopSecret);
$verifier->authenticateStorefrontRequest($request, $shopId, $shopSecret);- Update
ResponseSigner::getRegistrationSignatureusage
$proof = $responseSigner->getRegistrationSignature(
$appConfig,
['shop-id' => $shopId, 'shop-url' => $shopUrl]
);