diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c90125..6546f535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ Changelog dev-master ---------- +### Bug fixes + +- [node] Mixin remove command does not accept a path + +alpha-5 +------- + ### Features - [shell] Added "shell:clear" command to support clearing the console output diff --git a/features/phpcr_node_mixin_remove.feature b/features/phpcr_node_mixin_remove.feature index 39e2526d..b55b32d6 100644 --- a/features/phpcr_node_mixin_remove.feature +++ b/features/phpcr_node_mixin_remove.feature @@ -10,7 +10,7 @@ Feature: Remove mixin to the current node Scenario: Remove a mixin to the current node Given the current node is "/tests_general_base" - And I execute the "node:mixin:remove mix:versionable --no-ansi" command + And I execute the "node:mixin:remove . mix:versionable --no-ansi" command And I save the session Then the command should not fail And the node at "/tests_general_base" should not have the mixin "mix:versionable" diff --git a/src/PHPCR/Shell/Console/Application/SessionApplication.php b/src/PHPCR/Shell/Console/Application/SessionApplication.php index d43d6098..e517e735 100644 --- a/src/PHPCR/Shell/Console/Application/SessionApplication.php +++ b/src/PHPCR/Shell/Console/Application/SessionApplication.php @@ -16,7 +16,7 @@ class SessionApplication extends BaseApplication { const APP_NAME = 'PHPCRSH'; - const APP_VERSION = '1.0.0-alpha4'; + const APP_VERSION = '1.0.0-alpha5'; protected $shellApplication; diff --git a/src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinRemoveCommand.php b/src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinRemoveCommand.php index 9209a817..4eee4a19 100644 --- a/src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinRemoveCommand.php +++ b/src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinRemoveCommand.php @@ -13,6 +13,7 @@ protected function configure() { $this->setName('node:mixin:remove'); $this->setDescription('Remove the named mixin to the current node'); + $this->addArgument('path', InputArgument::REQUIRED, 'Path of node'); $this->addArgument('mixinName', InputArgument::REQUIRED, 'The name of the mixin node type to be removeed'); $this->setHelp(<<getHelper('phpcr')->getSession(); $mixinName = $input->getArgument('mixinName'); - $currentNode = $session->getCurrentNode(); + $path = $input->getArgument('path'); + $currentNode = $session->getNodeByPathOrIdentifier($path); $currentNode->removeMixin($mixinName); } }