-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Versioning support #96
Conversation
…annotations" This reverts commit f4ab6d5.
- The correct versionable mixin is set on document creation, checkin and checkout - A document cannot have a @Version field if it is not versionable - Corrected the exiting version related tests
…:testRemoveVersion is still failing !!
…pe that handles version deletion correctly
…ccess to use reflection
…s instead of the hack
…rom test documents Conflicts: README.md lib/Doctrine/ODM/PHPCR/UnitOfWork.php lib/vendor/jackalope tests/Doctrine/Tests/ODM/PHPCR/Functional/VersioningTest.php
…ng of @versionname and @VersionCreated
$node->addMixin('mix:simpleVersionable'); | ||
} elseif ($metadata->versionable === 'full') { | ||
$node->addMixin('mix:versionable'); | ||
} elseif ($metadata->versionable) { |
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.
no need for those 2 last "else"
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.
i removed the check whether the document is versionable of an unknown type.
but i want to keep the last line, we call this method on checkin and checkout as well, whithout sanitizing. and there we want to notice if somebody tries to checkin a document that is not versionable.
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.
ah no .. my point wasn't that the exception throwing should be removed .. but actually my comment was bogus .. never mind :)
@@ -14,7 +14,7 @@ | |||
public $nodeType = 'nt:unstructured'; | |||
/** @var string */ | |||
public $repositoryClass; | |||
/** @var boolean */ | |||
/** @var string */ | |||
public $versionable = false; |
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.
string with a boolean default ? this seems weird
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.
removed the default
i will merge tomorrow unless somebody finds more issues. went through the api with lukas again and he is ok with it. |
this PR fixes http://www.doctrine-project.org/jira/browse/PHPCR-4 |
adding versioning support as discussed on the mailing list. please see the added doc in the readme to see how this is to be used. the rudimentary versioning support that existed before is heavily refactored. if you used it, you will need to change:
@Version
annotation is gone, it makes not much sense. for old version snapshot documents, you can use @ VersionName and@VersionCreated
to track the metadata.apart from that, we added a removeVersion and update to latest jackalope with lots of fixes in version handling code.