-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[create-pull-request] automated change (#1680)
Co-authored-by: shopwareBot <[email protected]>
- Loading branch information
1 parent
cb77fb7
commit b17cdf5
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
resources/references/adr/2025-01-29-make-rule-classes-internal.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Make Rule classes internal | ||
date: 2025-01-29 | ||
area: core | ||
tags: [core, rules] | ||
--- | ||
|
||
# Make Rule classes internal | ||
|
||
::: info | ||
This document represents an architecture decision record (ADR) and has been mirrored from the ADR section in our Shopware 6 repository. | ||
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/adr/2025-01-29-make-rule-classes-internal.md) | ||
::: | ||
|
||
## Context | ||
The existing rule system is flexible but complex, making it difficult to evolve and maintain. Allowing unrestricted extensions of rule classes slows down improvements and increases the complexity of the system. | ||
|
||
See RFC: https://github.com/shopware/shopware/discussions/5785 | ||
|
||
## Decision | ||
We will mark existing rule classes as internal, limiting direct usage by third parties. Developers should create new rule classes instead of modifying existing ones. | ||
|
||
Nearly all rule classes will be marked as internal, with a few exceptions: | ||
``` | ||
LineItemOfTypeRule | ||
LineItemProductStatesRule | ||
PromotionCodeOfTypeRule | ||
ZipCodeRule | ||
BillingZipCodeRule | ||
ShippingZipCodeRule | ||
``` | ||
|
||
These classes will remain public for now, because they rely on configuration which is reasonably expected to be extended by third-party developers. | ||
|
||
## Consequences | ||
* Faster evolution of the rule system | ||
* Clearer extension mechanisms for developers | ||
* Potential migration efforts for third-party developers currently extending rule classes | ||
* Internal rule implementations may evolve |