Skip to content

[WIP] Use real object managers #40

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

Closed

Conversation

lcobucci
Copy link
Contributor

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

Depends on #39

The methods `EntityManagerInterface#getReference()` and
`EntityManagerInterface#getPartialReference()` have nullable return.

That's properly documented for `getReference()` but had to be fixed for
`getPartialReference()`.
So that things would be compatible with both ORM and ODM.
With the necessary dependencies on Travis-CI to ensure the build will
run properly.

Following the same approach as
https://github.com/doctrine/mongodb/blob/1.6.3/.travis.yml#L61 (for PHP
7+ installation).
@lcobucci
Copy link
Contributor Author

This should replace #18 and serve as initial implementation for #31

Based on the class metadata we can easily fetch data from any
configuration format.
@alexander-schranz
Copy link

any update to this @lcobucci

@ondrejmirtes
Copy link
Member

ondrejmirtes commented Oct 24, 2018 via email

@enumag
Copy link
Contributor

enumag commented Nov 7, 2018

ping @ondrejmirtes ;-)

@ondrejmirtes
Copy link
Member

I'm really looking forward to this but we have to solve #39 first.


parameters:
doctrine:
objectManagerLoader: tests/DoctrineIntegration/ORM/entity-manager.php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer how in #18 (or #47 :) ) i can just specify the mappings here, this basically makes a whole bunch of code that has to be copy pasted into any project using this - surely this file could be actually part of the extension?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #18 or #47, you always need to copy the mappings here.

With this approach, you just need to provide a file with your real EntityManager which is simple enough in DI-driven application.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that makes sense.

@mcfedr mcfedr mentioned this pull request Feb 12, 2019
@ondrejmirtes
Copy link
Member

Superceded by #49.

@lcobucci lcobucci deleted the poc-use-real-object-managers branch February 12, 2019 16:34
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.

5 participants