-
-
Couldn't load subscription status.
- Fork 142
[WIP]Feature/doctrine support #25
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
[WIP]Feature/doctrine support #25
Conversation
| It'd be great if you parsed the Entity annotation to know if the class has a custom repository, and in such case, changed the class return of getRepository to that class. Other than that, great job! 👍 |
| yeah there is much todo. iam currently working on this :) |
| Great! Then it'd be nice that you edited your issue and you marked it as [WIP] so it's possible to see that the PR isn't at a finished state. |
…y exists in the same folder as the entity
| looks ready to me at least of:
|
| In the container.xml file, inside the Maybe it'd be better to rely on this to resolve |
| I think that you could also support findXXX methods on the repository if you returned a "EntityFQN[]" type. This is probably possible since you can do |
| Also, in this PR or after this is merged it'd be nice to have support for the magic methods findByXXXX and findOneByXXXX |
…ile and cache data
Conflicts: src/fr/adrienbrault/idea/symfony2plugin/Symfony2ProjectComponent.java src/fr/adrienbrault/idea/symfony2plugin/SymfonyInterfacesHelper.java
…ow Repository classes are working fine
| thx for the new Symfony2InterfacesUtil. now Repository classes resolved corrent on interfaces |
| Does this PR support resolution of target entities? http://symfony.com/doc/master/cookbook/doctrine/resolve_target_entity.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isGetRepositoryCall would be a better name imho
| do anyone see problems on merging it now?. i have two TODOs mentioned in commits, but i want to look later for a better solution. currently this feature works good on a big symfony2 at worktime, and save me lot of time. furthermore i have many more in pipe and want to close this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using a xpath query ?
| Please at least update your type provider with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should also support \\Doctrine\\Common\\Persistence\\ObjectManager::getRepository for people getting the repository from the EntityManager
…ager::getRepository calls
| +1 thumbs up for the good work @Haehnchen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the user has an entity named Repository because he is managing a Repository ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you really want to exclude the repositories, maybe using Symfony2InterfacesUtil.isInstanceOf would work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing / with \ should work, right ?
| Really awesome, thanks! |
now we have also some doctrine support. :)