diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 9610f0899e..46a3de602d 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1078,8 +1078,6 @@ class Process * @return self The current Process instance * * @throws LogicException In case the process is running - * - * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public function setInput($input) { diff --git a/src/Symfony/Component/Process/ProcessBuilder.php b/src/Symfony/Component/Process/ProcessBuilder.php index a782fd69e9..041ac38f5b 100644 --- a/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/Symfony/Component/Process/ProcessBuilder.php @@ -172,8 +172,6 @@ class ProcessBuilder * @return ProcessBuilder * * @throws InvalidArgumentException In case the argument is invalid - * - * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public function setInput($input) { diff --git a/src/Symfony/Component/Process/ProcessUtils.php b/src/Symfony/Component/Process/ProcessUtils.php index dd0a74373c..9ce461bf7c 100644 --- a/src/Symfony/Component/Process/ProcessUtils.php +++ b/src/Symfony/Component/Process/ProcessUtils.php @@ -83,8 +83,6 @@ class ProcessUtils * @return string The validated input * * @throws InvalidArgumentException In case the input is not valid - * - * Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0. */ public static function validateInput($caller, $input) { @@ -95,12 +93,6 @@ class ProcessUtils if (is_scalar($input)) { return (string) $input; } - // deprecated as of Symfony 2.5, to be removed in 3.0 - if (is_object($input) && method_exists($input, '__toString')) { - trigger_error('Passing an object as an input is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - return (string) $input; - } throw new InvalidArgumentException(sprintf('%s only accepts strings or stream resources.', $caller)); } diff --git a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php index 8aa3765245..8fa93c9f0e 100644 --- a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -232,26 +232,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase ); } - /** - * @dataProvider provideLegacyInputValues - * @group legacy - */ - public function testLegacyValidInput($expected, $value) - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $process = $this->getProcess('php -v'); - $process->setInput($value); - $this->assertSame($expected, $process->getInput()); - } - - public function provideLegacyInputValues() - { - return array( - array('stringifiable', new Stringifiable()), - ); - } - public function chainedCommandsOutputProvider() { if ('\\' === DIRECTORY_SEPARATOR) { @@ -1191,14 +1171,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase abstract protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()); } -class Stringifiable -{ - public function __toString() - { - return 'stringifiable'; - } -} - class NonStringifiable { }