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-6824: Fixed doctrine metadata property/foreign key relationship methods #7

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

Steveb-p
Copy link
Contributor

@Steveb-p Steveb-p commented Oct 17, 2023

Question Answer
JIRA issue IBX-6824
Type bug
Target Ibexa version v4.6
BC breaks no

Despite the name

public function getRelationshipByForeignColumn(string $foreignProperty): DoctrineRelationshipInterface;

method was working with foreign key column in it's actual implementation. This PR remedies that, making the method properly return based on foreign column.

Additionally:

  • a proper
public function getRelationshipByForeignProperty(string $foreignProperty): DoctrineRelationshipInterface;

is introduced.

  • MappingExceptionInterface and RuntimeMappingExceptionInterface are introduced. The former is responsible for any errors that happen when schema metadata is declared (column collisions primarily). The latter can be thrown if non-existent columns are being accessed and similar.
  • Relation-related tests are added to ExpressionVisitor

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 for example @ibexa/php-dev for back-end changes and/or @ibexa/javascript-dev for
    front-end changes).

@Steveb-p Steveb-p added Bug Something isn't working Ready for review labels Oct 17, 2023
@Steveb-p Steveb-p requested a review from a team October 17, 2023 11:04
@alongosz alongosz requested a review from a team October 17, 2023 12:23
@Steveb-p Steveb-p merged commit b235b78 into main Oct 18, 2023
5 checks passed
@Steveb-p Steveb-p deleted the relationship-metadata branch October 18, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants