Skip to content

Use real object managers #49

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

Merged
merged 6 commits into from
Feb 12, 2019

Conversation

mcfedr
Copy link
Contributor

@mcfedr mcfedr commented Feb 12, 2019

#40, rebased on #48

as in the original, with this implementation we're able to use the class metadata to retrieve repository information, given the user provides the entity/document manager instance.

Additionally, will use default repositoryClass when no objectManagerLoader is provided.

@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from f6f7380 to 7e7fce1 Compare February 12, 2019 14:43
lcobucci and others added 3 commits February 12, 2019 16:54
@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from 7e7fce1 to f07d357 Compare February 12, 2019 14:54
@ondrejmirtes
Copy link
Member

I'll look into this ASAP.

What's cool that it will allow more precise info for purposes like magic findBy methods on repositories (like #35) and gasp static DQL validation!

@mcfedr
Copy link
Contributor Author

mcfedr commented Feb 12, 2019

Not so sure about 0b810f7 - is the good approach for this problem?

@ondrejmirtes
Copy link
Member

It's not needed - you can ask instanceof $string.

@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from 0b810f7 to 88def91 Compare February 12, 2019 15:32
@mcfedr
Copy link
Contributor Author

mcfedr commented Feb 12, 2019

It's not needed - you can ask instanceof $string.

In 1cc26d1, But phpstan doesn't get it, so still need to alias $metadata and use @var... its slightly better, and you cannot instance 'Literal' so its not very pretty...

Without the alias, I get

------ ----------------------------------------------------------------------------------------------------------------
  Line   src/Type/Doctrine/ObjectMetadataResolver.php
 ------ ----------------------------------------------------------------------------------------------------------------
  52     Access to an undefined property Doctrine\Common\Persistence\Mapping\ClassMetadata::$customRepositoryClassName.
  57     Access to an undefined property Doctrine\Common\Persistence\Mapping\ClassMetadata::$customRepositoryClassName.
 ------ ----------------------------------------------------------------------------------------------------------------

@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from 88def91 to 1cc26d1 Compare February 12, 2019 15:39
@lcobucci
Copy link
Contributor

@mcfedr thanks for picking things up and continuing the work 👍 Way too many things got in my way and I couldn't continue.

@mcfedr
Copy link
Contributor Author

mcfedr commented Feb 12, 2019

@mcfedr thanks for picking things up and continuing the work 👍 Way too many things got in my way and I couldn't continue.

yes, these things happen, I had some time and saw stuff so nearly ready that I'm excited to use. Hopefully we can finish these things off asap and get a new release out.

@mcfedr
Copy link
Contributor Author

mcfedr commented Feb 12, 2019

On that note, I must say thanks @ondrejmirtes for being available and ready to review this and the other PRs today.

@ondrejmirtes
Copy link
Member

ondrejmirtes commented Feb 12, 2019 via email

@ondrejmirtes
Copy link
Member

Thank you! 👍

@ondrejmirtes ondrejmirtes merged commit 8193b44 into phpstan:master Feb 12, 2019
@ondrejmirtes
Copy link
Member

This is mind-blowing: 0947875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants