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
316
}
@@ -1089,6 +1091,7 @@ public function getEnv()
1089
1091
*
1090
1092
* An environment variable value should be a string.
1091
1093
* If it is an array, the variable is ignored.
1094
+
* If it is false, it will be removed when env vars are otherwise inherited.
1092
1095
*
1093
1096
* That happens in PHP when 'argv' is registered into
1094
1097
* the $_ENV array for instance.
@@ -1106,7 +1109,7 @@ public function setEnv(array $env)
1106
1109
1107
1110
$this->env = array();
1108
1111
foreach ($envas$key => $value) {
1109
-
$this->env[$key] = (string) $value;
1112
+
$this->env[$key] = $value;
1110
1113
}
1111
1114
1112
1115
return$this;
@@ -1148,9 +1151,13 @@ public function setInput($input)
1148
1151
* Gets the options for proc_open.
1149
1152
*
1150
1153
* @return array The current options
1154
+
*
1155
+
* @deprecated since version 3.3, to be removed in 4.0.
1151
1156
*/
1152
1157
publicfunctiongetOptions()
1153
1158
{
1159
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
1160
+
1154
1161
return$this->options;
1155
1162
}
1156
1163
@@ -1160,9 +1167,13 @@ public function getOptions()
1160
1167
* @param array $options The new options
1161
1168
*
1162
1169
* @return self The current Process instance
1170
+
*
1171
+
* @deprecated since version 3.3, to be removed in 4.0.
1163
1172
*/
1164
1173
publicfunctionsetOptions(array$options)
1165
1174
{
1175
+
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
1176
+
1166
1177
$this->options = $options;
1167
1178
1168
1179
return$this;
@@ -1174,9 +1185,13 @@ public function setOptions(array $options)
1174
1185
* This is true by default.
1175
1186
*
1176
1187
* @return bool
1188
+
*
1189
+
* @deprecated since version 3.3, to be removed in 4.0. Enhanced Windows compatibility will always be enabled.
1177
1190
*/
1178
1191
publicfunctiongetEnhanceWindowsCompatibility()
1179
1192
{
1193
+
@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);
1194
+
1180
1195
return$this->enhanceWindowsCompatibility;
1181
1196
}
1182
1197
@@ -1186,9 +1201,13 @@ public function getEnhanceWindowsCompatibility()
1186
1201
* @param bool $enhance
1187
1202
*
1188
1203
* @return self The current Process instance
1204
+
*
1205
+
* @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 +1217,13 @@ public function setEnhanceWindowsCompatibility($enhance)
1198
1217
* Returns whether sigchild compatibility mode is activated or not.
1199
1218
*
1200
1219
* @return bool
1220
+
*
1221
+
* @deprecated since version 3.3, to be removed in 4.0. Sigchild compatibility will always be enabled.
1201
1222
*/
1202
1223
publicfunctiongetEnhanceSigchildCompatibility()
1203
1224
{
1225
+
@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);
1226
+
1204
1227
return$this->enhanceSigchildCompatibility;
1205
1228
}
1206
1229
@@ -1214,9 +1237,13 @@ public function getEnhanceSigchildCompatibility()
1214
1237
* @param bool $enhance
1215
1238
*
1216
1239
* @return self The current Process instance
1240
+
*
1241
+
* @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);
1263
+
}
1264
+
1234
1265
$this->inheritEnv = (bool) $inheritEnv;
1235
1266
1236
1267
return$this;
@@ -1240,9 +1271,13 @@ public function inheritEnvironmentVariables($inheritEnv = true)
1240
1271
* Returns whether environment variables will be inherited or not.
1241
1272
*
1242
1273
* @return bool
1274
+
*
1275
+
* @deprecated since version 3.3, to be removed in 4.0. Environment variables will always be inherited.
1243
1276
*/
1244
1277
publicfunctionareEnvironmentVariablesInherited()
1245
1278
{
1279
+
@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);
0 commit comments