Skip to content

Releases: shopware/app-php-sdk

5.2.0

Choose a tag to compare

@Gaitholabi Gaitholabi released this 01 Jul 10:33
9fd9b59

Upgrade Notes (5.2.0)

  • Uninstall may now keep the shop. AppLifecycle::delete() respects the app.deleted keepUserData flag and no longer deletes the shop when it's true. If you relied on uninstall always removing the shop, branch on ShopDeletedEvent::keepUserData() / BeforeShopDeletionEvent::keepUserData().
  • Corrupt app.deleted bodies now throw. An invalid-JSON webhook body raises MalformedWebhookBodyException instead 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

New Contributors

Full Changelog: 5.1.4...5.2.0

5.1.4

Choose a tag to compare

@cyl3x cyl3x released this 19 Jun 19:15
2605e18

What's Changed

Full Changelog: 5.1.3...5.1.4

5.1.3

Choose a tag to compare

@cyl3x cyl3x released this 15 Jun 14:29
1dca515

What's Changed

Full Changelog: 5.1.2...5.2.0

5.1.2

Choose a tag to compare

@socrec socrec released this 10 Jun 12:36
e0876d6

What's Changed

New Contributors

Full Changelog: 5.1.1...5.1.2

5.1.1

Choose a tag to compare

@untilu29 untilu29 released this 02 Jun 08:18
09ea6c1

What's Changed

Full Changelog: 5.1.0...5.1.1

5.1.0

Choose a tag to compare

@En0Ma1259 En0Ma1259 released this 21 Apr 09:18
b506ae4

What's Changed

New Contributors

Full Changelog: 5.0.3...5.1.0

5.0.3

Choose a tag to compare

@mstegmeyer mstegmeyer released this 01 Apr 09:06
76b48df

What's Changed

Full Changelog: 5.0.2...5.0.3

5.0.2

Choose a tag to compare

@mstegmeyer mstegmeyer released this 24 Mar 07:13
9e540a5

What's Changed

Full Changelog: 5.0.1...5.0.2

5.0.1

Choose a tag to compare

@mstegmeyer mstegmeyer released this 16 Feb 12:50
98665b2

What's Changed

Full Changelog: 5.0.0...5.0.1

5.0.0

Choose a tag to compare

@Gaitholabi Gaitholabi released this 04 Feb 15:31
bf6884f

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

  • RequestVerifier public API updated to accept raw secrets and adds authenticateRegistrationRequestWithShopSignature.
  • ResponseSigner::getRegistrationSignature now expects proof parameters array.
  • ShopInterface expanded with required getters/setters for pending/previous secrets, rotation time, and registration confirmation.
  • AppConfiguration constructor adds enforceDoubleSignature (default false); 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 keys shop-id, shop-url

ShopInterface (new required methods)

  • getPendingShopUrl, setPendingShopUrl
  • getPendingShopSecret, setPendingShopSecret
  • getPreviousShopSecret, setPreviousShopSecret
  • setShopSecret
  • getSecretsRotatedAt, setSecretsRotatedAt
  • isRegistrationConfirmed, setRegistrationConfirmed
  • hasVerifiedWithDoubleSignature, setVerifiedWithDoubleSignature (deprecated)

Recommendations

  • Replace direct usage of RequestVerifier with DualSignatureRequestVerifier to enable in-flight support during secret rotation windows.

Required code changes

  1. Update your ShopInterface implementation
  • Add the new fields and methods listed above.
  1. Update any storage/persistence you own
  • Persist the new fields your ShopInterface now exposes.
  • Example: add columns for pending_shop_secret, pending_shop_url, previous_shop_secret, secrets_rotated_at, registration_confirmed, and has_verified_with_double_signature to your shop table.
  1. 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);
  1. Update ResponseSigner::getRegistrationSignature usage
$proof = $responseSigner->getRegistrationSignature(
    $appConfig,
    ['shop-id' => $shopId, 'shop-url' => $shopUrl]
);