Skip to content

Commit

Permalink
Undeprecate escapeArgument(). (#1039)
Browse files Browse the repository at this point in the history
Undeprecate escapeArgument and replace error with updated method
documentation per
#1023 (comment).
  • Loading branch information
markdorison authored Jul 7, 2021
1 parent 85efe28 commit 5470dde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Common/ProcessUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ private function __construct()
/**
* Escapes a string to be used as a shell argument.
*
* This method is a copy of a method that was deprecated by Symfony 3.3 and
* removed in Symfony 4; it will be removed once there is an actual
* replacement for escapeArgument.
*
* @param string $argument
* The argument that will be escaped.
*
* @return string
* The escaped argument.
*
* @deprecated since version 3.3, to be removed in 4.0. Use a command line array or give env vars to the `Process::start/run()` method instead.
*/
public static function escapeArgument($argument)
{
@trigger_error('The ' . __METHOD__ . '() method is a copy of a method that was deprecated by Symfony 3.3 and removed in Symfony 4; it will be removed in Robo 2.0.', E_USER_DEPRECATED);

//Fix for PHP bug #43784 escapeshellarg removes % from given string
//Fix for PHP bug #49446 escapeshellarg doesn't work on Windows
//@see https://bugs.php.net/bug.php?id=43784
Expand Down

0 comments on commit 5470dde

Please sign in to comment.