wiki.techinc.nl/includes/exception
Max Semenik 77ce3b98a0 Replace wfShellExec() with a class
This function has gotten so unwieldy that a helper was
introduced. Instead, here's this class that makes
shelling out easier and more readable.

Example usage:
  $result = Shell::command( 'shell command' )
       ->environment( [ 'ENVIRONMENT_VARIABLE' => 'VALUE' ] )
       ->limits( [ 'time' => 300 ] )
       ->execute();

  $exitCode = $result->getExitCode();
  $output = $result->getStdout();

This is a minimal change, so lots of stuff remains
unrefactored - I'd rather limit the scope of this commit.
A future improvement could be an ability to get stderr
separately from stdout.

Caveat: execution errors (proc_open is disabled/returned error) now
throw errors instead of returning a status code. wfShellExec() still
emulates this behavior though.

Competing commit: I7dccb2b67a4173a8a89b035e444fbda9102e4d0f
<legoktm> MaxSem: so you should continue working on your patch and I'll
          probably refactor on top of it later after its merged :P

Change-Id: I8ac9858b80d7908cf7e7981d7e19d0fc9c2265c0
2017-09-08 21:49:49 -07:00
..
BadRequestError.php
BadTitleError.php
ErrorPageError.php Fix/hack ErrorPageError to work from non-UI contexts 2017-07-06 20:04:31 +00:00
FatalError.php
HttpError.php Remove auto-generated "Constructor" documentation on constructors 2017-07-21 12:19:30 +02:00
LocalizedException.php Use Sanitizer::stripAllTags( $x ) instead of html_entity_decode( strip_tags( $x ) ) 2017-07-07 16:53:53 -07:00
MWContentSerializationException.php Remove trailing empty lines in PHP 2017-01-16 22:06:43 +01:00
MWException.php Remove $wgExceptionHooks 2017-05-22 00:57:44 +02:00
MWExceptionHandler.php exception: Support message normalisation for structured logging 2017-08-30 22:38:57 +01:00
MWExceptionRenderer.php Use short type bool/int in param documentation 2017-08-20 13:20:59 +02:00
MWUnknownContentModelException.php Remove trailing empty lines in PHP 2017-01-16 22:06:43 +01:00
PermissionsError.php User group memberships that expire 2017-01-27 09:24:20 +00:00
ProcOpenError.php Replace wfShellExec() with a class 2017-09-08 21:49:49 -07:00
ReadOnlyError.php
ShellDisabledError.php Replace wfShellExec() with a class 2017-09-08 21:49:49 -07:00
ThrottledError.php
UserBlockedError.php
UserNotLoggedIn.php Merge "Miscellaneous indentation tweaks" 2017-02-28 18:38:36 +00:00