Skip to content

feat: Simplify driver version migration through magento-version file#4410

Closed
joannalauu wants to merge 4 commits into
developfrom
support-different-versions
Closed

feat: Simplify driver version migration through magento-version file#4410
joannalauu wants to merge 4 commits into
developfrom
support-different-versions

Conversation

@joannalauu
Copy link
Copy Markdown
Contributor

@joannalauu joannalauu commented Apr 5, 2026

PR Checklist

  • Commit message follows our contributing guidelines
  • Tests added/updated (for bug fixes/features)
  • Documentation added/updated (for bug fixes/features)

PR Type

  • Bug fix
  • Feature
  • Style update
  • Refactor
  • Test
  • Build
  • CI
  • Docs
  • Performance
  • Other (please describe)

Current behavior

Fixes: #3137
Part of: #

New behavior

Supports defining a magento-version file that exports provideDaffExternalRouterMagentoDriver and DaffExternalRouterMagentoDriver from the desired magento driver version. Application usage of provideDaffExternalRouterMagentoDriver and DaffExternalRouterMagentoDriver will import from magento-version. This allows all version updates to be centralized in one file.

Additional changes:

  • Requests user input for Magento version during schematic generation
  • Generates magento-version file with commerce schematic
  • Update magento v2.4.1 & v2.4.2 to use providers, depreciating modules
  • Update demo app to use magento-version file

Breaking change?

  • Yes
  • No

Additional context

- Requests user input for Magento version during schematic generation
- Generates `magento-version` file with commerce schematic
- Update magento v2.4.1 & v2.4.2 to use providers, depreciating modules
- Update demo app to use `magento-version` file
import { DaffShopifyExternalRouterDriver } from '@daffodil/external-router/driver/shopify';

import { FakeExternalRouterService } from './fake';
import { DaffExternalRouterMagentoDriver } from '../../../drivers/magento-version';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ideal - thinking of better solution

@@ -0,0 +1,4 @@
// To use a different Magento API version, change the import paths below.
// Supported versions: 2.4.1, 2.4.2, 2.4.3
export { provideDaffExternalRouterMagentoDriver } from '@daffodil/external-router/driver/magento/2.4.3';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're hoping to avoid having the app dev responsible for changing a list of imports. Were you unable to get tree shaking to work with the imports?

@joannalauu
Copy link
Copy Markdown
Contributor Author

Closed in favor of #4424

@joannalauu joannalauu closed this Apr 11, 2026
@joannalauu joannalauu deleted the support-different-versions branch April 11, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Create strategy for supporting different platform versions

2 participants