Conversation

malarzm

Today at work I've realized there's currently no rules for ORM's embeddables so here's an attempt to change that :) I'll remove WIP once I'm done with my goals, for now I'm making a PR for early feedback (or to learn that somebody else is already working on this).

Goals:

  • Check if property's type agrees with ORM's knowledge
  • Check columns specified in embeddables just like for entities

@@ -64,9 +68,6 @@ public function processNode(Node $node, Scope $scope): array
}

$className = $class->getName();
if ($objectManager->getMetadataFactory()->isTransient($className)) {
Copy link
Author

Choose a reason for hiding this comment

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

I'm trying to figure out internally why the embeddables are considered transient, but removal of this check causes no test failures

Copy link
Author

Choose a reason for hiding this comment

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

Also classes not managed by Doctrine will have an exception thrown a bit later while trying to get their metadata and will return early from the rule with no errors, so I believe the intent is preserved

Copy link
Author

Choose a reason for hiding this comment

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

I've created an issue in ORM but I think we can continue without waiting for its resolution doctrine/orm#8006

@malarzmmalarzm changed the title [WIP] Support ORM's embeddables Support ORM's embeddables Jan 28, 2020
@malarzm

PR is now ready :)

@malarzmmalarzm requested a review from lookyman February 7, 2020 12:30
@malarzm

Anybody? @lookyman @ondrejmirtes ?

@ondrejmirtes

Hi, sorry for keeping you waiting, I'll look into this when I have the time.

@enumag

Any news on this one? It would be helpful imo. :-)

@kissifrot

Looks like this PR has conflicts, but it would be helpful to have it merged :)

@ondrejmirtesondrejmirtes force-pushed the 1.3.x branch 2 times, most recently from aa4e98e to 8b28264 Compare May 25, 2023 13:40
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.