Skip to content

Commit

Permalink
minor Sylius#13772 [ADR][API] Update ADR for providing locales after …
Browse files Browse the repository at this point in the history
…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 | Sylius#12766 and Sylius#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
-------

4e82e09 [ADR][API] Update ADR for providing locales after changing the approach
ff3d798 [ADR][API] Reject the old one and add the new ADR for providing locales after changing the approach
AdamKasp authored Mar 18, 2022
2 parents e6017a5 + ff3d798 commit ee9c314
Showing 2 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ee9c314

Please sign in to comment.