Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion features/phpcr_node_mixin_remove.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion src/PHPCR/Shell/Console/Application/SessionApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(<<<HERE
Removes the specified mixin node type from this node and removes
Expand All @@ -28,7 +29,8 @@ public function execute(InputInterface $input, OutputInterface $output)
{
$session = $this->getHelper('phpcr')->getSession();
$mixinName = $input->getArgument('mixinName');
$currentNode = $session->getCurrentNode();
$path = $input->getArgument('path');
$currentNode = $session->getNodeByPathOrIdentifier($path);
$currentNode->removeMixin($mixinName);
}
}