Skip to content

Conversation

@FreekVR
Copy link
Contributor

@FreekVR FreekVR commented Oct 3, 2025

Breaking changes:

  • Drops support for platform 2 (Flespakket)
  • Determines the platform at runtime based on the account/api key rather than on boot, this changes the signature of the boot functions
  • Deprecates existing Platform classes and functions
  • Deprecates existing Carrier definitions and underlying definitions likes package types and shipment options
  • Available Carriers are determined per proposition, no global carrier list available any longer

@FreekVR FreekVR changed the title V3 proposition feat!: replace static platform config with runtime dynamic proposition config Oct 3, 2025
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 91.48936% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.88%. Comparing base (01450f0) to head (20d81ab).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Context/Model/PluginSettingsViewContext.php 14.28% 6 Missing ⚠️
src/Validation/Validator/CarrierSchema.php 82.14% 5 Missing ⚠️
src/Context/Model/GlobalContext.php 76.47% 4 Missing ⚠️
src/Frontend/View/CarrierSettingsItemView.php 96.87% 4 Missing ⚠️
src/Account/Service/AccountSettingsService.php 62.50% 3 Missing ⚠️
src/Frontend/Service/FrontendRenderService.php 0.00% 3 Missing ⚠️
src/Proposition/Service/PropositionService.php 97.69% 3 Missing ⚠️
...p/Options/Definition/CountryOfOriginDefinition.php 0.00% 2 Missing ⚠️
...c/App/Options/Definition/CustomsCodeDefinition.php 0.00% 2 Missing ⚠️
...ns/Definition/DisableDeliveryOptionsDefinition.php 0.00% 2 Missing ⚠️
... and 11 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #387      +/-   ##
============================================
- Coverage     95.21%   94.88%   -0.33%     
- Complexity     1890     2010     +120     
============================================
  Files           352      355       +3     
  Lines          6202     6588     +386     
============================================
+ Hits           5905     6251     +346     
- Misses          297      337      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

joerivanveen and others added 3 commits November 11, 2025 11:53
* feat!: get some config values at runtime based on api key
* feat!: remove flespakket

* test: fix delivery date test
…tion (#377)

replace PHP platform config with JSON proposition config files, and map it to existing definitions. This prepares the PDK for a future definition using a propositions API which determines available features and carriers.

---------

Co-authored-by: Joeri van Veen <joeri@myparcel.nl>
Co-authored-by: jochemgravendeel <jochem.gravendeel@myparcel.nl>
FreekVR and others added 10 commits November 11, 2025 12:14
…roposition in the PHP PDK

this changes the delivery options config to use config provided via the plugin, allowing zero-code rollout of new carriers through the propositions endpoint in the future

fixes INT-1150
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tion (#377)

replace PHP platform config with JSON proposition config files, and map it to existing definitions. This prepares the PDK for a future definition using a propositions API which determines available features and carriers.

---------

Co-authored-by: Joeri van Veen <joeri@myparcel.nl>
Co-authored-by: jochemgravendeel <jochem.gravendeel@myparcel.nl>
@FreekVR FreekVR marked this pull request as ready for review November 11, 2025 12:25
@FreekVR FreekVR requested a review from a team as a code owner November 11, 2025 12:25
Copilot AI review requested due to automatic review settings November 11, 2025 12:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a major architectural change to replace static platform-based configuration with dynamic proposition-based configuration determined at runtime. The primary goal is to enable multi-platform support by determining the platform context from the account/API key rather than at boot time.

Key changes:

  • Removes Platform 2 (Flespakket) support
  • Shifts from boot-time platform determination to runtime proposition resolution
  • Deprecates legacy Platform classes and Carrier definitions
  • Introduces proposition-based carrier configuration

Reviewed Changes

Copilot reviewed 223 out of 507 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Test snapshot files (ExportOrderActionTest) Updates expected test outputs to reflect changes in shipment options and carrier handling
Test snapshot files (CarrierTest, ContextServiceTest) Updates carrier data structures from old format to new proposition-based format
Test snapshot files (DeliveryOptionsServiceTest) Adds platform configuration structure from propositions
AbstractUsesMockPdkInstance.php Clears proposition ID between tests for isolation
CarrierSchemaTest.php Updates to use PropositionCarrierFeatures instead of CarrierCapabilities
Multiple test files Replaces carrier capability references with proposition feature references
TestBootstrapper.php Adds forPlatform() method for platform-specific test setup
MockPdkConfig.php Removes static platform configuration
CarrierSchema.php Updates to work with proposition metadata instead of carrier features
SchemaRepository.php Gets platform name from proposition service
PostReturnShipmentsRequest.php Uses proposition service for carrier lookup
ShipmentOptions.php Adds ALL_SHIPMENT_OPTIONS constant
CustomsDeclarationItem.php Gets local country from proposition config
SettingsManager.php Uses proposition service for carrier defaults
PlatformManagerInterface.php Removes getPlatform() method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants