-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[API] Add BC layer for transition from :read to :index and :show serialization groups #15780
Merged
Conversation
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
TheMilek
added
DX
Issues and PRs aimed at improving Developer eXperience.
API
APIs related issues and PRs.
labels
Jan 29, 2024
probot-autolabeler
bot
added
the
Maintenance
CI configurations, READMEs, releases, etc.
label
Jan 29, 2024
Bunnyshell Preview Environment deletedAvailable commands:
|
jakubtobiasz
added a commit
that referenced
this pull request
Jan 31, 2024
This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 <!-- see the comment below --> | | Bug fix? | no | | New feature? | yes | | BC breaks? | no | | Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file --> | | License | MIT | <!-- - Bug fixes must be submitted against the 1.12 branch - Features and deprecations must be submitted against the 1.13 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 --> here is only split of the read group to show and index, in another PR there is a [BC layer](#15780) to handle it Commits ------- [Country] Split read serialization group [Currency] Split read serialization group [Address] Split read serialization group [Adjustment] Split read serialization group [AdminUser] Split read serialization group [AvatarImage] Split read serialization group [Promotion] Split read serialization group [Channel] Split read serialization group [ChannelPriceHistoryConfig] Split read serialization group [Customer] Split read serialization group [ExchangeRate] Split read serialization group [Locale] Split read serialization group [Order] Split read serialization group [Payment] Split read serialization group [Product] Split read serialization group [Shipment] Split read serialization group [Tax] Split read serialization group [Taxon] Split read serialization group [Zone] Split read serialization group
TheMilek
force-pushed
the
SYL-3301
branch
4 times, most recently
from
January 31, 2024 13:11
40bc20d
to
740a040
Compare
jakubtobiasz
approved these changes
Jan 31, 2024
NoResponseMate
approved these changes
Jan 31, 2024
Comment on lines
+44
to
+67
foreach ($groups as $group) { | ||
if ($this->shouldReadGroupBeAdded($group) && !$this->skipAddingReadGroup) { | ||
$readGroup = str_replace([':show', ':index'], ':read', $group); | ||
|
||
if (in_array($readGroup, $groups, true)) { | ||
continue; | ||
} | ||
|
||
$groups[] = $readGroup; | ||
} | ||
|
||
if ($this->shouldIndexAndShowGroupsBeAdded($group) && !$this->skipAddingIndexAndShowGroups) { | ||
$indexGroup = str_replace(':read', ':index', $group); | ||
$showGroup = str_replace(':read', ':show', $group); | ||
|
||
if (!in_array($indexGroup, $groups, true)) { | ||
$groups[] = $indexGroup; | ||
} | ||
|
||
if (!in_array($showGroup, $groups, true)) { | ||
$groups[] = $showGroup; | ||
} | ||
} | ||
} |
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.
This could be simplified, especially w/ the static flags
Thank you, @TheMilek! |
GSadee
pushed a commit
to Sylius/SyliusApiBundle
that referenced
this pull request
Feb 2, 2024
This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 <!-- see the comment below --> | | Bug fix? | no | | New feature? | yes | | BC breaks? | no | | Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file --> | | License | MIT | <!-- - Bug fixes must be submitted against the 1.12 branch - Features and deprecations must be submitted against the 1.13 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 --> here is only split of the read group to show and index, in another PR there is a [BC layer](Sylius/Sylius#15780) to handle it Commits ------- [Country] Split read serialization group [Currency] Split read serialization group [Address] Split read serialization group [Adjustment] Split read serialization group [AdminUser] Split read serialization group [AvatarImage] Split read serialization group [Promotion] Split read serialization group [Channel] Split read serialization group [ChannelPriceHistoryConfig] Split read serialization group [Customer] Split read serialization group [ExchangeRate] Split read serialization group [Locale] Split read serialization group [Order] Split read serialization group [Payment] Split read serialization group [Product] Split read serialization group [Shipment] Split read serialization group [Tax] Split read serialization group [Taxon] Split read serialization group [Zone] Split read serialization group
GSadee
added a commit
that referenced
this pull request
Feb 14, 2024
… add missing contract tests (TheMilek) This PR was merged into the 1.13 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.13 <!-- see the comment below --> | | Bug fix? | a bit | | New feature? | no | | BC breaks? | no | | Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file --> | | License | MIT | <!-- - Bug fixes must be submitted against the 1.12 branch - Features and deprecations must be submitted against the 1.13 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 --> Related to #15780 Commits ------- 66b4df0 fix ship shipments fe0ff72 [Order] Add missing serialization groups d36fc23 [Payment] Fix serialization groups c48c6d9 [Adjustment] Add missing contract tests 7129bcb [AdminUser] Add missing contract tests 7c067d3 [Zone] Fix serialization groups and add missing contract tests f03aa27 [Country] Fix serialization groups and add missing contract tests b60d8cc [Product] Fix serialization groups and add missing contract tests 562a7b4 [Shipment] Add missing contract tests f3672b6 [Currency] Add missing contract tests d3c03e8 [Customer] Add missing contract tests 51830aa [Channel] fix serialization groups 9dc51f9 [Address] add missing contract test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API
APIs related issues and PRs.
DX
Issues and PRs aimed at improving Developer eXperience.
Maintenance
CI configurations, READMEs, releases, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BC layer for #15770