-
Notifications
You must be signed in to change notification settings - Fork 43
feat: add compatibility-date #845
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
Conversation
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 introduces a new compatibility_date configuration field to control date-based compatibility behavior across both project and extension configurations, with shared validation/helpers and context-aware config loading.
Changes:
- Add
compatibility_dateto the generated JSON schemas and to both project/extension config structs. - Introduce
internal/compatibilitydate parsing/validation and “at least” comparison helpers with tests. - Thread
context.Contextthrough config/extension discovery paths so logging and cancellation can be propagated.
Reviewed changes
Copilot reviewed 56 out of 56 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| shopware-project-schema.json | Adds compatibility_date to the project config schema. |
| shopware-extension-schema.json | Adds compatibility_date to the extension config schema. |
| internal/verifier/project.go | Updates project config loading to pass a context (logger disabled). |
| internal/shop/config_test.go | Updates ReadConfig call signature; adds compatibility date tests. |
| internal/shop/config.go | Adds CompatibilityDate to project config; validates and defaults it; adds helpers; ReadConfig now takes context. |
| internal/extension/root_test.go | Updates GetExtensionByFolder call signature to include context. |
| internal/extension/root.go | GetExtensionByFolder now takes context and passes it down; zip path currently uses background context. |
| internal/extension/project.go | Propagates context through extension discovery/config reads. |
| internal/extension/platform.go | Propagates context into platform plugin detection/config loading. |
| internal/extension/config_test.go | Updates readExtensionConfig signature; adds compatibility date default/validation/helper tests. |
| internal/extension/config.go | Adds CompatibilityDate to extension config, defaulting + validation; readExtensionConfig now takes context. |
| internal/extension/bundle_test.go | Updates bundle creation calls to pass context. |
| internal/extension/bundle.go | Propagates context into bundle config loading. |
| internal/extension/app_test.go | Updates app creation calls to pass context. |
| internal/extension/app.go | Propagates context into app config loading. |
| internal/compatibility/date_test.go | Adds unit tests for date validation/comparison/default behavior. |
| internal/compatibility/date.go | Implements date parsing/validation and comparison helpers plus a default date. |
| cmd/project/project_upgrade_check.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_storefront_watch.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_storefront_build.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_image_proxy.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_upload.go | Passes cmd.Context() into extension detection and project config loading. |
| cmd/project/project_extension_update.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_uninstall.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_outdated.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_list.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_install.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_delete.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_deactivate.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_extension_activate.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_dump.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_debug.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_config_init.go | Initializes new project configs with a default compatibility date. |
| cmd/project/project_clear_cache.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_admin_watch.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_admin_build.go | Passes cmd.Context() into project config loading. |
| cmd/project/project_admin_api.go | Passes command context into project config loading. |
| cmd/project/ci.go | Passes cmd.Context() into project config loading. |
| cmd/extension/extension_zip.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_version.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_validate.go | Passes cmd.Context() into extension detection (dir path). |
| cmd/extension/extension_prepare.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_name.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_format.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_fix.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_changelog.go | Passes cmd.Context() into extension detection (dir path). |
| cmd/extension/extension_build.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_ai_twig_upgrade.go | Passes cmd.Context() into extension detection. |
| cmd/extension/extension_admin_watch.go | Passes cmd.Context() into extension detection and project config loading fallback. |
| cmd/account/account_producer_extension_info_push.go | Passes cmd.Context() into extension detection for folder paths. |
| cmd/account/account_producer_extension_info_pull.go | Passes cmd.Context() into extension detection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.