Skip to content

Commit 4cd1349

Browse files
committed
Use new APIs
1 parent b3a8bc1 commit 4cd1349

24 files changed

+71
-85
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
},
1616
"minimum-stability": "stable",
1717
"require-dev": {
18-
"symfony/symfony": "~2.6|~3.0",
19-
"phpunit/phpunit": "~3.7.28",
18+
"symfony/symfony": "~3.0",
19+
"phpunit/phpunit": "~4.0",
2020
"behat/behat": "~3.0",
2121
"phpspec/phpspec": "3.0",
2222
"jackalope/jackalope-doctrine-dbal": "~1.1",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ protected function getDefaultCommand()
272272
*
273273
* {@inheritDoc}
274274
*/
275-
public function renderException($exception, $output)
275+
public function renderException(\Exception $exception, OutputInterface $output)
276276
{
277277
$output->writeln(sprintf('<exception>%s</exception>', $exception->getMessage()));
278278
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Console\Input\InputArgument;
1717
use Symfony\Component\Console\Input\InputOption;
1818
use PHPCR\RepositoryInterface;
19+
use PHPCR\Shell\Console\Helper\Table;
1920

2021
class AccessControlPrivilegeListCommand extends BasePhpcrCommand
2122
{
@@ -65,7 +66,7 @@ public function execute(InputInterface $input, OutputInterface $output)
6566
$privileges = $acm->getPrivileges($absPath);
6667
}
6768

68-
$table = $this->get('helper.table')->create();
69+
$table = new Table($output);
6970
$table->setHeaders(array('Name'));
7071

7172
foreach ($privileges as $privilege) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Output\OutputInterface;
1616
use Symfony\Component\Console\Input\InputArgument;
1717
use PHPCR\RepositoryInterface;
18+
use PHPCR\Shell\Console\Helper\Table;
1819

1920
class LockInfoCommand extends BasePhpcrCommand
2021
{
@@ -55,7 +56,7 @@ public function execute(InputInterface $input, OutputInterface $output)
5556
'Session scoped?' => $lock->isSessionScoped() ? 'yes' : 'no',
5657
);
5758

58-
$table = $this->get('helper.table')->create();
59+
$table = new Table($output);
5960

6061
foreach ($info as $label => $value) {
6162
$table->addRow(array($label, $value));

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

Lines changed: 2 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 PHPCR\RepositoryInterface;
17+
use PHPCR\Shell\Console\Helper\Table;
1718

1819
class LockTokenListCommand extends BasePhpcrCommand
1920
{
@@ -41,7 +42,7 @@ public function execute(InputInterface $input, OutputInterface $output)
4142

4243
$lockTokens = $lockManager->getLockTokens();
4344

44-
$table = $this->get('helper.table')->create();
45+
$table = new Table($output);
4546
$table->setHeaders(array('Token'));
4647

4748
foreach ($lockTokens as $token) {

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

Lines changed: 2 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 PHPCR\Shell\Console\Helper\Table;
1718

1819
class NodeInfoCommand extends BasePhpcrCommand
1920
{
@@ -75,7 +76,7 @@ public function execute(InputInterface $input, OutputInterface $output)
7576
);
7677

7778
$output->writeln('<path>' . $node->getPath() . '</path>');
78-
$table = $this->get('helper.table')->create();
79+
$table = new Table($output);
7980

8081
foreach ($info as $label => $value) {
8182
$table->addRow(array($label, $value));

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use PHPCR\ItemNotFoundException;
2121
use PHPCR\PropertyInterface;
2222
use PHPCR\NodeInterface;
23+
use PHPCR\Shell\Console\Helper\Table;
2324

2425
class NodeListCommand extends BasePhpcrCommand
2526
{
@@ -116,7 +117,7 @@ public function execute(InputInterface $input, OutputInterface $output)
116117
}
117118

118119
foreach ($nodes as $node) {
119-
$table = $this->get('helper.table')->create();
120+
$table = new Table($output);
120121
$this->renderNode($node, $table, array(), $filter);
121122

122123
if ($table->getNumberOfRows() > 0) {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Input\InputInterface;
1616
use Symfony\Component\Console\Output\OutputInterface;
1717
use Symfony\Component\Console\Input\InputArgument;
18+
use PHPCR\Shell\Console\Helper\Table;
1819

1920
class NodeReferencesCommand extends BasePhpcrCommand
2021
{
@@ -32,7 +33,7 @@ protected function configure()
3233
If the <info>name</info> parameter is null then all referring REFERENCES are returned
3334
regardless of name.
3435
HERE
35-
);
36+
);
3637
}
3738

3839
public function execute(InputInterface $input, OutputInterface $output)
@@ -52,7 +53,7 @@ public function execute(InputInterface $input, OutputInterface $output)
5253
$references['weak'] = $node->getWeakReferences($name ?: null);
5354
$references['strong'] = $node->getReferences($name ?: null);
5455

55-
$table = $this->get('helper.table')->create();
56+
$table = new Table($output);
5657
$table->setHeaders(array(
5758
'Path', 'Property', 'Type',
5859
));

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

Lines changed: 2 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 PHPCR\Shell\Console\Helper\Table;
1718

1819
class NodeTypeListCommand extends BasePhpcrCommand
1920
{
@@ -40,7 +41,7 @@ public function execute(InputInterface $input, OutputInterface $output)
4041

4142
$nodeTypes = $nodeTypeManager->getAllNodeTypes();
4243

43-
$table = $this->get('helper.table')->create();
44+
$table = new Table($output);
4445
$table->setHeaders(array('Name', 'Primary Item Name', 'Abstract?', 'Mixin?', 'Queryable?'));
4546

4647
foreach ($nodeTypes as $nodeType) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Console\Command\Command;
1515
use Symfony\Component\Console\Input\InputInterface;
1616
use Symfony\Component\Console\Output\OutputInterface;
17+
use PHPCR\Shell\Console\Helper\Table;
1718

1819
class RepositoryDescriptorListCommand extends BasePhpcrCommand
1920
{
@@ -34,7 +35,7 @@ public function execute(InputInterface $input, OutputInterface $output)
3435
$repository = $session->getRepository();
3536
$keys = $repository->getDescriptorKeys();
3637

37-
$table = $this->get('helper.table')->create();
38+
$table = new Table($output);
3839
$table->setHeaders(array('Key', 'Value', 'Standard?'));
3940

4041
foreach ($keys as $key) {

0 commit comments

Comments
 (0)