Skip to content

1.0.0

Latest

Choose a tag to compare

@akozubskicr akozubskicr released this 22 Jul 09:45

Added

  • Initial release of the Comfino SDK adapter layer for Magento 2.
  • MagentoHttpClientAdapter — PSR-18 ClientInterface wrapping Magento's native HTTP client with support for all HTTP methods and timeout escalation for automatic retries.
  • MagentoCacheAdapter — PSR-6 CacheItemPoolInterface and TaggableCacheItemPoolInterface wrapping Magento's native cache with tag-based invalidation support (invalidateTag() / invalidateTags()).
  • CacheItem — PSR-6 CacheItemInterface and TaggableCacheItemInterface with per-item tag management.
  • MagentoServerRequestConverter — Converts Magento request objects to PSR-7 ServerRequestInterface for webhook processing.
  • MagentoCartBuilder — Converts Magento Quote and Order entities to Comfino Cart DTOs, including single-product carts for the widget / product-type-filter use case.
  • MagentoCustomerBuilder — Extracts customer and shipping address data from Magento Order entities, with billing/shipping fallback logic for virtual orders.
  • MagentoPlatformInfoPlatformInfoInterface implementation that reads shop name, Magento version, locale, currency, domain, and database version from Magento's native services.
  • MagentoLanguageProviderLanguageProviderInterface implementation that returns a normalized ISO 639-1 language code from the current store locale.
  • MagentoShopEnvironmentBuilder — Detects the active Magento frontend theme and edition, resolves the theme family, and assembles the shop environment payload for the Comfino frontend.
  • Bootstrap initializer for wiring all SDK services with Magento framework components via DI.

Changed

  • Updated transitive dependencies: php-api-client (adds GetCreditors, AllowedProductConfig DTO, and related request/response classes) and php-sdk (adds SettingsManager::getCreditors(), SettingsManager::getAllowedProductsConfig(), AllowedProductsConfigBuilder, PaywallConfig / OrderFactory optional allowedProductsConfig arguments).
  • Updated MagentoCartBuilderTest to reflect the revised AbstractCartBuilder contract: when shipping has no VAT, getDeliveryNetCost() now returns the gross value (not null) and getDeliveryTaxValue() returns 0; for explicit 0% VAT products, getNetPrice() returns the gross price (not null).

Fixed

  • MagentoHttpClientAdapter now forwards response headers (including Content-Type) to the PSR-7 response object. Without this fix, the SDK's response deserializer could not detect JSON content and raised ResponseValidationError on every API call.