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

Initial import of phpcr fixtures #10

Merged
merged 5 commits into from Jun 7, 2011

Conversation

sixty-nine
Copy link

I have created a new "phpcr-fixtures" branch and implemented a Loader and Purger class for data fixtures based on PHPCR. We use it here at Liip to load fixtures in Jackalope.

Additionaly as our fixtures need to access the DIC, I have extended the FixtureInterface in PHPCRFixtureInterface so that we can inject the DIC from the Loader. I would be happy to change this is you have a better way to access the DIC from a FixtureInterface.

@stof
Copy link
Member

stof commented Apr 4, 2011

Why are you putting the Symfony DIC here ? this has nothing to do in a Doctrine project as there is no use of the Symfony2 DIC.

Symfony extends the Loader to allow to inject the DIC when the fixtures implement ContaienrAwareInterface but it is not done by Doctrine itself: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/DoctrineAbstractBundle/Common/DataFixtures/Loader.php

…the PHPCRFixtureInterface which is not needed anymore
@sixty-nine
Copy link
Author

Thank you for your comment, I was not aware of the Symfony extended Loader. The references to the Symfony DIC have been removed.

…ly a copy of the MongoDBExecutor, modified the @author to reflect that + cleanup
@lsmith77
Copy link
Member

lsmith77 commented Apr 7, 2011

looks good on a quick skim

namespace Doctrine\Common\DataFixtures\Purger;

use Doctrine\ODM\PHPCR\DocumentManager;
use Jackalope\Node;
Copy link
Member

Choose a reason for hiding this comment

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

this use statement is useless.

@dbu
Copy link
Member

dbu commented May 21, 2011

hi stof, does this make sense now, do you think you can merge it?

/**
* Delete all the nodes in the repository which are not prefixed with jcr:
*/
protected function deleteAllNodes()
Copy link
Member

Choose a reason for hiding this comment

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

I don't really see the need of an additional method for this.

@stof
Copy link
Member

stof commented Jun 7, 2011

@dbu I cannot merge it as I don't have access to the repo. I'm not even memeber of the Doctrine project.

beberlei added a commit that referenced this pull request Jun 7, 2011
Initial import of phpcr fixtures
@beberlei beberlei merged commit b913182 into doctrine:master Jun 7, 2011
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.

None yet

5 participants