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

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
ondrejmirtes merged 6 commits into phpstan:master from mcfedr:poc-use-real-object-managers
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.

arnaud-lb, karser, and andreybolonin reacted with hooray emoji arnaud-lb, karser, and andreybolonin reacted with heart emoji
@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from f6f7380 to 7e7fce1 Compare February 12, 2019 14:43
@mcfedr mcfedr force-pushed the poc-use-real-object-managers branch from 7e7fce1 to f07d357 Compare February 12, 2019 14:54
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!

Copy link
Contributor Author

mcfedr commented Feb 12, 2019

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

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
Copy link
Contributor Author

mcfedr commented Feb 12, 2019
edited
Loading

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
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.

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.

lcobucci reacted with heart emoji

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.

Copy link
Member

ondrejmirtes commented Feb 12, 2019 via email

It’s going to be awesome 😊
On 2019年2月12日 at 21:49, Fred Cox ***@***.***> wrote: On that note, I must say thanks @ondrejmirtes <https://github.com/ondrejmirtes> for being available and ready to review this and the other PRs today. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#49 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAGZuBzMe27a8kHDJQHPJJtx8Ri7icPnks5vMyjZgaJpZM4a2iIY> .
-- Ondřej Mirtes

Copy link
Member

Thank you! 👍

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

This is mind-blowing: 0947875

lcobucci reacted with rocket emoji mcfedr and jackbentley reacted with eyes emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ondrejmirtes ondrejmirtes ondrejmirtes approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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