feature #14147 Removed deprecations in Process component (dosten)

This PR was squashed before being merged into the 3.0-dev branch (closes #14147).

Discussion
----------

Removed deprecations in Process component

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

8ef1960 Removed deprecations in Process component
This commit is contained in:
Fabien Potencier 2015-04-02 14:09:51 +02:00
commit 637c8bba3a
4 changed files with 0 additions and 40 deletions

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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));
}

View File

@ -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
{
}