8000 [Process] Deprecate ProcessBuilder · symfony/process@201c3bd · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 201c3bd

Browse files
[Process] Deprecate ProcessBuilder
1 parent b9b8a8a commit 201c3bd

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.4.0
5+
-----
6+
7+
* deprecated the ProcessBuilder class
8+
49
3.3.0
510
-----
611

ProcessBuilder.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
namespace Symfony\Component\Process;
1313

14+
@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use the Process class instead.', ProcessBuilder::class), E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Process\Exception\InvalidArgumentException;
1517
use Symfony\Component\Process\Exception\LogicException;
1618

1719
/**
1820
* Process builder.
1921
*
2022
* @author Kris Wallsmith <kris@symfony.com>
23+
*
24+
* @deprecated since version 3.4, to be removed in 4.0. Use the Process class instead.
2125
*/
2226
class ProcessBuilder
2327
{
@@ -120,13 +124,9 @@ public function setWorkingDirectory($cwd)
120124
* @param bool $inheritEnv
121125
*
122126
* @return $this
123-
*
124-
* @deprecated since version 3.3, to be removed in 4.0.
125127
*/
126128
public function inheritEnvironmentVariables($inheritEnv = true)
127129
{
128-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
129-
130130
$this->inheritEnv = $inheritEnv;
131131

132132
return $this;
@@ -221,13 +221,9 @@ public function setTimeout($timeout)
221221
* @param string $value The option value
222222
*
223223
* @return $this
224-
*
225-
* @deprecated since version 3.3, to be removed in 4.0.
226224
*/
227225
public function setOption($name, $value)
228226
{
229-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
230-
231227
$this->options[$name] = $value;
232228

233229
return $this;

Tests/ProcessBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Process\ProcessBuilder;
1616

17+
/**
18+
* @group legacy
19+
*/
1720
class ProcessBuilderTest extends TestCase
1821
{
19-
/**
20-
* @group legacy
21-
*/
2222
public function testInheritEnvironmentVars()
2323
{
2424
$proc = ProcessBuilder::create()

0 commit comments

Comments
 (0)
0