Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support ORM's embeddables #108

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

Open
malarzm wants to merge 2 commits into phpstan:1.3.x
base: 1.3.x
Choose a base branch
Loading
from malarzm:embeddables
Open

Conversation

Copy link

@malarzm malarzm commented Jan 27, 2020
edited
Loading

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

andreybolonin reacted with hooray emoji
@@ -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

@malarzm malarzm changed the title (削除) [WIP] Support ORM's embeddables (削除ここまで) (追記) Support ORM's embeddables (追記ここまで) Jan 28, 2020
Copy link
Author

malarzm commented Jan 30, 2020

PR is now ready :)

Copy link
Author

malarzm commented Feb 24, 2020

Copy link
Member

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

malarzm and andreybolonin reacted with thumbs up emoji

Copy link
Contributor

enumag commented Nov 17, 2021

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

Copy link

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

@ondrejmirtes ondrejmirtes 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 GitHub. Already have an account? Sign in to comment
Reviewers

@lookyman lookyman Awaiting requested review from lookyman

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /