Skip to content

Commit 43b3ac9

Browse files
committed
"Fixed" deprecation warnings
1 parent 7c53939 commit 43b3ac9

File tree

7 files changed

+38
-7
lines changed

7 files changed

+38
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"symfony/finder": "~2.3",
1010
"symfony/serializer": "~2.3",
1111
"symfony/yaml": "~2.3",
12-
"symfony-cmf/resource": "dev-master"
12+
"symfony-cmf/resource": "~1.0"
1313
},
1414
"minimum-stability": "dev",
1515
"require-dev": {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use PHPCR\Shell\Transport\TransportRegistry;
3232
use PHPCR\Shell\Config\ProfileLoader;
3333
use PHPCR\Shell\Console\Helper\TableHelper;
34+
use PHPCR\Shell\Console\Helper\HelperSet;
3435

3536
/**
3637
* Main application for PHPCRSH
@@ -136,12 +137,12 @@ protected function registerHelpers()
136137
new PathHelper(),
137138
new RepositoryHelper($phpcrHelper),
138139
new ResultFormatterHelper($textHelper),
139-
new TableHelper(),
140+
new TableHelper(false),
140141
$phpcrHelper
141142
);
142143

143144
foreach ($helpers as $helper) {
144-
$this->getHelperSet()->set($helper);
145+
$this->setHelperSet(new HelperSet($helpers));
145146
}
146147
}
147148

src/PHPCR/Shell/Console/Helper/ConfigHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function loadConfig()
119119
$config[$configKey] = array();
120120

121121
if ($this->filesystem->exists($fullPath)) {
122-
$config[$configKey] = Yaml::parse($fullPath);
122+
$config[$configKey] = Yaml::parse(file_get_contents($fullPath));
123123
} elseif($this->filesystem->exists($fullDistPath)) {
124124
$config[$configKey] = Yaml::parse($fullDistPath);
125125
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace PHPCR\Shell\Console\Helper;
4+
5+
use Symfony\Component\Filesystem\Filesystem;
6+
use Symfony\Component\Console\Helper\Helper;
7+
use Symfony\Component\Console\Helper\HelperSet as BaseHelperSet;
8+
9+
/**
10+
* Helper for launching external editor
11+
*
12+
* @author Daniel Leech <daniel@dantleech.com>
13+
*/
14+
class HelperSet extends BaseHelperSet
15+
{
16+
public function get($name)
17+
{
18+
$level = error_reporting(0);
19+
$helper = parent::get($name);
20+
error_reporting($level);
21+
return $helper;
22+
}
23+
24+
}
25+

src/PHPCR/Shell/Console/Helper/TableHelper.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ class TableHelper extends OriginalTableHelper
1717
{
1818
private $numberOfRows = 0;
1919

20+
public function __construct()
21+
{
22+
parent::__construct(false);
23+
}
24+
2025
public function create()
2126
{
22-
return new self;
27+
return new self(false);
2328
}
2429

2530
public function addRow(array $row)

src/PHPCR/Shell/Subscriber/ProfileLoaderSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function getSubscribedEvents()
2525
public function __construct(ProfileLoader $profileLoader)
2626
{
2727
$this->profileLoader = $profileLoader;
28-
$this->dialogHelper = new DialogHelper;
28+
$this->dialogHelper = new DialogHelper(false);
2929
}
3030

3131
public function handleProfileInit(ProfileInitEvent $e)

src/PHPCR/Shell/Subscriber/ProfileWriterSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function getSubscribedEvents()
2323
public function __construct(ProfileLoader $profileLoader)
2424
{
2525
$this->profileLoader = $profileLoader;
26-
$this->dialogHelper = new DialogHelper;
26+
$this->dialogHelper = new DialogHelper(false);
2727
}
2828

2929
public function handleProfileInit(ProfileInitEvent $e)

0 commit comments

Comments
 (0)