diff --git a/CHANGELOG.md b/CHANGELOG.md index b27c157d..43df0c0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ beta4 - [version] Versioning commands can use relative paths - [node:property:show] Text fields are truncated - [profile] Workspace given from CLI does not override profile workspace +- [command] Removed node:definition command: Jackalope now supports this, and + this command would never have worked, see: beta2 ----- diff --git a/features/all/phpcr_node_definition.feature b/features/all/phpcr_node_definition.feature deleted file mode 100644 index 6dd93e0f..00000000 --- a/features/all/phpcr_node_definition.feature +++ /dev/null @@ -1,17 +0,0 @@ -Feature: Show CND for node - In order to show the compact node definition for a node - As a user that is logged into the shell - I should be able to run a command which does that - - Background: - Given that I am logged in as "testuser" - And the "session_data.xml" fixtures are loaded - - Scenario: Show node definition - Given the current node is "/tests_general_base" - And I execute the "node:definition daniel --no-ansi" command - Then the command should fail - And I should see the following: - """ - Not implemented - """ diff --git a/src/PHPCR/Shell/Console/Application/ShellApplication.php b/src/PHPCR/Shell/Console/Application/ShellApplication.php index 66ee1419..2433f6fa 100644 --- a/src/PHPCR/Shell/Console/Application/ShellApplication.php +++ b/src/PHPCR/Shell/Console/Application/ShellApplication.php @@ -144,7 +144,6 @@ protected function registerPhpcrCommands() $this->add(new CommandPhpcr\VersionCheckinCommand()); $this->add(new CommandPhpcr\NodeCreateCommand()); $this->add(new CommandPhpcr\NodeCorrespondingCommand()); - $this->add(new CommandPhpcr\NodeDefinitionCommand()); $this->add(new CommandPhpcr\NodeFileImportCommand()); $this->add(new CommandPhpcr\NodePropertySetCommand()); $this->add(new CommandPhpcr\NodeSetPrimaryTypeCommand()); diff --git a/src/PHPCR/Shell/Console/Command/Phpcr/NodeDefinitionCommand.php b/src/PHPCR/Shell/Console/Command/Phpcr/NodeDefinitionCommand.php deleted file mode 100644 index 278410c0..00000000 --- a/src/PHPCR/Shell/Console/Command/Phpcr/NodeDefinitionCommand.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace PHPCR\Shell\Console\Command\Phpcr; - -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Input\InputArgument; -use PHPCR\Util\CND\Writer\CndWriter; - -class NodeDefinitionCommand extends BasePhpcrCommand -{ - protected function configure() - { - $this->setName('node:definition'); - $this->setDescription('Show the CND Definition of specified node'); - $this->addArgument('path', InputArgument::REQUIRED, 'Path of node'); - $this->setHelp(<<dequiresDescriptor('jackalope.not_implemented.node.definition'); - } - - public function execute(InputInterface $input, OutputInterface $output) - { - $session = $this->get('phpcr.session'); - $path = $input->getArgument('path'); - $currentNode = $session->getNodeByPathOrIdentifier($path); - $workspace = $session->getWorkspace(); - $namespaceRegistry = $workspace->getNamespaceRegistry(); - - $nodeType = $currentNode->getDefinition(); - $cndWriter = new CndWriter($namespaceRegistry); - $out = $cndWriter->writeString(array($nodeType)); - $output->writeln(sprintf('%s', $out)); - } -}