phpcr/phpcr-shell

Versionable check is too strict

Closed this issue · 2 comments

The check if a node is versionable is too strict (function assertNodeIsVersionable in file /src/PHPCR/Shell/Console/Helper/NodeHelper.php).

A node type without mix:versionable can be derived from a node type with 'mix:versionable'. E.g.

[foo:bar] > nt:base, mix:versionable
[foo:baz] > foo:bar

The current versionable check throws an exception (Node "%s" is not versionable) for nodes of type foo:baz.

dbu commented

indeed. https://github.com/phpcr/phpcr-shell/blob/master/src/PHPCR/Shell/Console/Helper/NodeHelper.php#L35 should instead say if ($mixinType->isNodeType($mixinTypeName)) { to have phpcr handle the type inheritance checking. do you want to send a pull request for this?

dbu commented

fixed in #191