You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -52,6 +52,9 @@ public function __construct($script, $cwd = null, array $env = null, $timeout =
52
52
// command with exec
53
53
$php = 'exec '.$php;
54
54
}
55
+
if (null !== $options) {
56
+
@trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since version 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED);
@trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since version 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED);
@trigger_error(sprintf('Not inheriting environment variables is deprecated since Symfony 3.3 and will always happen in 4.0. Set "Process::inheritEnvironmentVariables()" to true instead.', __METHOD__), E_USER_DEPRECATED);
284
285
}
285
286
if ('\\' === DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) {
thrownewRuntimeException('Unable to launch a new process.');
314
310
}
@@ -1089,6 +1085,7 @@ public function getEnv()
1089
1085
*
1090
1086
* An environment variable value should be a string.
1091
1087
* If it is an array, the variable is ignored.
1088
+
* If it is false, it will be removed when env vars are otherwise inherited.
1092
1089
*
1093
1090
* That happens in PHP when 'argv' is registered into
1094
1091
* the $_ENV array for instance.
@@ -1106,7 +1103,7 @@ public function setEnv(array $env)
1106
1103
1107
1104
$this->env = array();
1108
1105
foreach ($envas$key => $value) {
1109
-
$this->env[$key] = (string) $value;
1106
+
$this->env[$key] = $value;
1110
1107
}
1111
1108
1112
1109
return$this;
@@ -1148,9 +1145,13 @@ public function setInput($input)
1148
1145
* Gets the options for proc_open.
1149
1146
*
1150
1147
* @return array The current options
1148
+
*
1149
+
* @deprecated since version 3.3, to be removed in 4.0.
1151
1150
*/
1152
1151
publicfunctiongetOptions()
1153
1152
{
1153
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
1154
+
1154
1155
return$this->options;
1155
1156
}
1156
1157
@@ -1160,9 +1161,13 @@ public function getOptions()
1160
1161
* @param array $options The new options
1161
1162
*
1162
1163
* @return self The current Process instance
1164
+
*
1165
+
* @deprecated since version 3.3, to be removed in 4.0.
1163
1166
*/
1164
1167
publicfunctionsetOptions(array$options)
1165
1168
{
1169
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
1170
+
1166
1171
$this->options = $options;
1167
1172
1168
1173
return$this;
@@ -1174,9 +1179,13 @@ public function setOptions(array $options)
1174
1179
* This is true by default.
1175
1180
*
1176
1181
* @return bool
1182
+
*
1183
+
* @deprecated since version 3.3, to be removed in 4.0. Enhanced Windows compatibility will always be enabled.
1177
1184
*/
1178
1185
publicfunctiongetEnhanceWindowsCompatibility()
1179
1186
{
1187
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
1188
+
1180
1189
return$this->enhanceWindowsCompatibility;
1181
1190
}
1182
1191
@@ -1186,9 +1195,13 @@ public function getEnhanceWindowsCompatibility()
1186
1195
* @param bool $enhance
1187
1196
*
1188
1197
* @return self The current Process instance
1198
+
*
1199
+
* @deprecated since version 3.3, to be removed in 4.0. Enhanced Windows compatibility will always be enabled.
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
@@ -1198,9 +1211,13 @@ public function setEnhanceWindowsCompatibility($enhance)
1198
1211
* Returns whether sigchild compatibility mode is activated or not.
1199
1212
*
1200
1213
* @return bool
1214
+
*
1215
+
* @deprecated since version 3.3, to be removed in 4.0. Sigchild compatibility will always be enabled.
1201
1216
*/
1202
1217
publicfunctiongetEnhanceSigchildCompatibility()
1203
1218
{
1219
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
1220
+
1204
1221
return$this->enhanceSigchildCompatibility;
1205
1222
}
1206
1223
@@ -1214,9 +1231,13 @@ public function getEnhanceSigchildCompatibility()
1214
1231
* @param bool $enhance
1215
1232
*
1216
1233
* @return self The current Process instance
1234
+
*
1235
+
* @deprecated since version 3.3, to be removed in 4.0.
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('Not inheriting environment variables is deprecated since Symfony 3.3 and will always happen in 4.0. Set "Process::inheritEnvironmentVariables()" to true instead.', __METHOD__), E_USER_DEPRECATED);
1257
+
}
1258
+
1234
1259
$this->inheritEnv = (bool) $inheritEnv;
1235
1260
1236
1261
return$this;
@@ -1240,9 +1265,13 @@ public function inheritEnvironmentVariables($inheritEnv = true)
1240
1265
* Returns whether environment variables will be inherited or not.
1241
1266
*
1242
1267
* @return bool
1268
+
*
1269
+
* @deprecated since version 3.3, to be removed in 4.0. Environment variables will always be inherited.
1243
1270
*/
1244
1271
publicfunctionareEnvironmentVariablesInherited()
1245
1272
{
1273
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Environment variables will always be inherited.', __METHOD__), E_USER_DEPRECATED);
1274
+
1246
1275
return$this->inheritEnv;
1247
1276
}
1248
1277
@@ -1561,6 +1590,50 @@ private function doSignal($signal, $throwException)
0 commit comments