-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: replace static platform config with runtime dynamic proposition config #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0cff271 to
d10775f
Compare
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
f3652e9 to
fe89693
Compare
* 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>
fe89693 to
851643d
Compare
…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>
There was a problem hiding this 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.
Breaking changes: