8000 Removed deprecations in Process component · symfony/symfony@8ef1960 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ef1960

Browse files
dostenfabpot
authored andcommitted
Removed deprecations in Process component
1 parent ac1465e commit 8ef1960

File tree

4 files changed

+0
-40
lines changed

4 files changed

+0
-40
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,6 @@ public function getInput()
10781078
* @return self The current Process instance
10791079
*
10801080
* @throws LogicException In case the process is running
1081-
*
1082-
* Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.
10831081
*/
10841082
public function setInput($input)
10851083
{

src/Symfony/Component/Process/ProcessBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ public function addEnvironmentVariables(array $variables)
172172
* @return ProcessBuilder
173173
*
174174
* @throws InvalidArgumentException In case the argument is invalid
175-
*
176-
* Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.
177175
*/
178176
public function setInput($input)
179177
{

src/Symfony/Component/Process/ProcessUtils.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ public static function escapeArgument($argument)
8383
* @return string The validated input
8484
*
8585
* @throws InvalidArgumentException In case the input is not valid
86-
*
87-
* Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.
8886
*/
8987
public static function validateInput($caller, $input)
9088
{
@@ -95,12 +93,6 @@ public static function validateInput($caller, $input)
9593
if (is_scalar($input)) {
9694
return (string) $input;
9795
}
98-
// deprecated as of Symfony 2.5, to be removed in 3.0
99-
if (is_object($input) && method_exists($input, '__toString')) {
100-
trigger_error('Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
101-
102-
return (string) $input;
103-
}
10496

10597
throw new InvalidArgumentException(sprintf('%s only accepts strings or stream resources.', $caller));
10698
}

src/Symfony/Component/Process/Tests/AbstractProcessTest.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -232,26 +232,6 @@ public function provideInputValues()
232232
);
233233
}
234234

235-
/**
236-
* @dataProvider provideLegacyInputValues
237-
* @group legacy
238-
*/
239-
public function testLegacyValidInput($expected, $value)
240-
{
241-
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
242-
243-
$process = $this->getProcess('php -v');
244-
$process->setInput($value);
245-
$this->assertSame($expected, $process->getInput());
246-
}
247-
248-
public function provideLegacyInputValues()
249-
{
250-
return array(
251-
array('stringifiable', new Stringifiable()),
252-
);
253-
}
254-
255235
public function chainedCommandsOutputProvider()
256236
{
257237
if ('\\' === DIRECTORY_SEPARATOR) {
@@ -1191,14 +1171,6 @@ public function methodProvider()
11911171
abstract protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array());
11921172
}
11931173

1194-
class Stringifiable
1195-
{
1196-
public function __toString()
1197-
{
1198-
return 'stringifiable';
1199-
}
1200-
}
1201-
12021174
class NonStringifiable
12031175
{
12041176
}

0 commit comments

Comments
 (0)
0