Skip to content

Commit ee0d780

Browse files
committed
Removed SharedRemove command
1 parent 798aece commit ee0d780

File tree

6 files changed

+17
-96
lines changed

6 files changed

+17
-96
lines changed

features/all/phpcr_node_remove.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,12 @@ Feature: Remove a node
5454
Scenario: Delete weak referenced node
5555
Given I execute the "node:remove /cms/articles/article3" command
5656
Then the command should not fail
57+
58+
Scenario: Remove the current node and all of its shared paths
59+
Given the current node is "/cms/articles"
60+
And I execute the "node:remove . --shared" command
61+
Then the command should fail
62+
And I should see the following:
63+
"""
64+
Not implemented
65+
"""

features/all/phpcr_node_shared_remove.feature

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/PHPCR/Shell/Console/Application/ShellApplication.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ protected function registerPhpcrCommands()
160160
$this->add(new CommandPhpcr\NodeUpdateCommand());
161161
$this->add(new CommandPhpcr\NodeReferencesCommand());
162162
$this->add(new CommandPhpcr\NodeSharedShowCommand());
163-
$this->add(new CommandPhpcr\NodeSharedRemoveCommand());
164163
$this->add(new CommandPhpcr\NodeRemoveCommand());
165164
$this->add(new CommandPhpcr\LockLockCommand());
166165
$this->add(new CommandPhpcr\LockInfoCommand());

src/PHPCR/Shell/Console/Command/Phpcr/DoctrineDbalInitCommand.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/PHPCR/Shell/Console/Command/Phpcr/NodeRemoveCommand.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Console\Input\InputInterface;
1515
use Symfony\Component\Console\Output\OutputInterface;
1616
use Symfony\Component\Console\Input\InputArgument;
17+
use Symfony\Component\Console\Input\InputOption;
1718

1819
class NodeRemoveCommand extends BasePhpcrCommand
1920
{
@@ -22,6 +23,7 @@ protected function configure()
2223
$this->setName('node:remove');
2324
$this->setDescription('Remove the node at path (can include wildcards)');
2425
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
26+
$this->addOption('shared', null, InputOption::VALUE_NONE, 'Remove nodes in shared set');
2527
$this->setHelp(<<<HERE
2628
Remove the node at the given path.
2729
HERE
@@ -61,7 +63,12 @@ public function execute(InputInterface $input, OutputInterface $output)
6163
}
6264

6365
$nodePaths[] = $node->getPath();
64-
$node->remove();
66+
67+
if ($input->getOption('shared')) {
68+
$node->removeSharedSet();
69+
} else {
70+
$node->remove();
71+
}
6572
}
6673

6774
// if we deleted the current path, switch back to the parent node

src/PHPCR/Shell/Console/Command/Phpcr/NodeSharedRemoveCommand.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)