Skip to content
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

IBX-2823: Added loadRelation method #115

Merged
merged 21 commits into from
Jun 7, 2022

Conversation

ciastektk
Copy link
Contributor

@ciastektk ciastektk commented May 27, 2022

Question Answer
JIRA issue IBX-2823
Type improvement
Target Ibexa version v4.1
BC breaks no

List of changes:

  • Changed method signature Ibexa\Contracts\Core\Persistence\Content\Handler::removeRelation - added optional third argument $destinationContentId which will be used to invalidate cache tag
  • Added method loadRelation to Ibexa\Contracts\Core\Persistence\Content\Handler to load relation by id
  • Added method loadRelation to Ibexa\Core\Persistence\Legacy\Content\Gateway to get relation data from database
  • Added cache usage in Ibexa\Core\Persistence\Cache\ContentHandler::countReverseRelations for better performance
  • Added new cache identifiers content_reverse_relations_count - crrc and relation - re
  • Passed $destinationContentId where removeRelation method is called

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ibexa/engineering).

@ciastektk ciastektk force-pushed the ibx-2823-added-load-relation-method branch from c087bcd to 0fb0392 Compare May 27, 2022 08:52
@konradoboza konradoboza requested a review from a team May 30, 2022 13:03
src/contracts/Persistence/Content/Handler.php Outdated Show resolved Hide resolved
src/lib/Persistence/Cache/ContentHandler.php Outdated Show resolved Hide resolved
src/lib/Persistence/Legacy/Content/Handler.php Outdated Show resolved Hide resolved
@ciastektk ciastektk requested a review from Steveb-p June 3, 2022 11:48
Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on IbexaDXP 4.1 commerce.

@ciastektk ciastektk merged commit 591a6f0 into 4.1 Jun 7, 2022
@ciastektk ciastektk deleted the ibx-2823-added-load-relation-method branch June 7, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants