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

Purge command/fixtures problem #27

Closed
kostiklv opened this issue Oct 22, 2011 · 2 comments
Closed

Purge command/fixtures problem #27

kostiklv opened this issue Oct 22, 2011 · 2 comments

Comments

@kostiklv
Copy link

While installing the cmf-sandbox I've noticed two issues:

  1. The command for importing fixtures doesn't work with --purge option
    app/console -v doctrine:phpcr:fixtures:load --path=src/Sandbox/MainBundle/Resources/data/fixtures/ --purge=true

The problem is that it's trying to purge the "/rep:policy" node, which seems to be a system node. It throws [PHPCR\NodeType\ConstraintViolationException]
HTTP 409: Unable to perform operation. Node is protected

While debugging, I tried to use doctrine:phpcr:purge command to test purging. It also didn't work. I've fixed that by changing isSystemNode method in NodeHelper to the following:

return preg_match('/^(jcr|rep):/', $node->getName());

The doctrine:phpcr:purge started to work.

  1. It turned out that the doctrine:phpcr:fixtures:load command with --purge option use a separate implementation of purge, found in PHPCRPurger class. Seems like it should be refactored to use NodeHelper.
dbu added a commit that referenced this issue Oct 22, 2011
merging temporary hint in readme about loading fixtures. the real issue is detailed in #27
@dbu
Copy link
Member

dbu commented Nov 13, 2011

we should clean this all up: the commands should go right into phpcr and then be made available to symfony in the phpcr-odm-bundle.

@lsmith77
Copy link
Member

closed in favor of symfony-cmf/symfony-cmf#124

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

3 participants