Skip to content

Add support for magic find* entity repository methods #35 #41

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 5 commits into from
Feb 13, 2019

Conversation

jackbentley
Copy link
Contributor

No description provided.

@keelerm84
Copy link

I believe this PR would also fix some issues I'm having. If the tests were passing, would this likely get merged?

@jackbentley
Copy link
Contributor Author

Thanks for the comment 😄 I've fixed the tests - was just CS issues.

@ondrejmirtes
Copy link
Member

Hi, this PR does not take full advantage of static analyser - ideally, it should know which exact findBy methods exist. It should be possible once the entity metadata are available from other PRs.

@jackbentley
Copy link
Contributor Author

I agree, @ondrejmirtes. I wanted to implement that behaviour but wasn't able to easily achieve it. Hopefully, that's something that can be improved when the API becomes available?

@ondrejmirtes
Copy link
Member

Hi, this will need to be reworked in light of #49 - it will allow you to find out which findBy methods are really there based on the entity :)

@ondrejmirtes
Copy link
Member

Thanks! I'll implement the checks as a rule.

@ondrejmirtes ondrejmirtes merged commit 1f2e082 into phpstan:master Feb 13, 2019
@ondrejmirtes
Copy link
Member

Implemented the rest: 5bf58a3

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