Skip to content
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

[RFC] Loader for both manager #65

Closed
ElectricMaxxx opened this issue Jul 15, 2014 · 0 comments
Closed

[RFC] Loader for both manager #65

ElectricMaxxx opened this issue Jul 15, 2014 · 0 comments

Comments

@ElectricMaxxx
Copy link
Member

I know that this one does not exist in reality, but i would like to have a fixture loader where i have got access to both managers (PHPCR, ORM).

We should keep the common interface of the loader (build(ObjectManager $manager)) and just add a setter for the second one. As our testing component creates them we should be able to inject the second manager.

Yea ... My DoctrineAdapter still supports a solution to create the referenced document by default just by setting:

$entity->setDocument($document);
$manager->persist($entity);

(other way around works too)
what means that i won't need the second manager, but there are use cases when i need it:

  • path creation by the help of the NodeHelper

But that leads my to a second solution: What about creating a parameter injection from the test, that would solve my problems too.

An advantage would be to purge both storages in one strike.

@dbu dbu closed this as completed Sep 20, 2018
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

No branches or pull requests

2 participants