mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
minor #13772 [ADR][API] Update ADR for providing locales after changing the approach (GSadee)
This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.11 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | https://github.com/Sylius/Sylius/pull/12766 and https://github.com/Sylius/Sylius/pull/13333 | License | MIT <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits -------4e82e09fdf[ADR][API] Update ADR for providing locales after changing the approachff3d798411[ADR][API] Reject the old one and add the new ADR for providing locales after changing the approach
This commit is contained in:
commit
ee9c3144d2
2 changed files with 34 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Using data provider for getting available locales in active channel for shop user
|
||||
|
||||
* Status: proposed
|
||||
* Status: rejected
|
||||
* Date: 2021-07-05
|
||||
|
||||
## Context and Problem Statement
|
||||
|
|
@ -23,4 +23,5 @@ Customer should have access only to locales available in their channel
|
|||
## Decision Outcome
|
||||
|
||||
Chosen option: Using Data Provider
|
||||
Shops shouldn't have many locales for each channel, so lack of a pagination is smaller problem than creating overcomplicated query in Doctrine Collection extension
|
||||
Shops shouldn't have many locales for each channel, so lack of a pagination is smaller problem than creating overcomplicated
|
||||
query in Doctrine Collection extension
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
# Using Doctrine Collection extension for getting available locales in active channel for shop user
|
||||
|
||||
* Status: accepted
|
||||
* Date: 2022-03-15
|
||||
|
||||
## Context and Problem Statement
|
||||
Customer should have access only to locales available in their channel
|
||||
|
||||
## Considered Options
|
||||
|
||||
### Using Doctrine Collection extension
|
||||
|
||||
* Good, because it is consistent with the actual approach of modifying responses content
|
||||
* Good, because it works with the rest of API extensions like pagination
|
||||
* Bad, because locales don't have relation to channel, so using Doctrine Collection extension is complicated
|
||||
|
||||
### Using Data Provider
|
||||
|
||||
* Good, because it is easy to implement
|
||||
* Bad, because using data providers omits extra Doctrine extensions like pagination
|
||||
|
||||
## Decision Outcome
|
||||
|
||||
Chosen option: **"Using Doctrine Collection extension"**
|
||||
|
||||
This option is consistent with current approach and does not omit Doctrine extensions like pagination.
|
||||
|
||||
## References
|
||||
|
||||
* [Original ADR for this problem](2021_07_05_api_providing_locales_available_in_active_channel.md)
|
||||
* [The implementation of changing the approach](https://github.com/Sylius/Sylius/pull/13333)
|
||||
Loading…
Add table
Reference in a new issue