From 0a6c33d069123321efb998c14d796e71b7605243 Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Mon, 26 Feb 2024 13:30:46 -0700 Subject: [PATCH] Replace deprecated Command::restrict (#80) --- includes/jobs/DataDumpGenerateJob.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/jobs/DataDumpGenerateJob.php b/includes/jobs/DataDumpGenerateJob.php index 8ed7b369..8d61111f 100644 --- a/includes/jobs/DataDumpGenerateJob.php +++ b/includes/jobs/DataDumpGenerateJob.php @@ -57,14 +57,12 @@ public function run() { $scriptOptions = [ 'wrapper' => MW_INSTALL_PATH . '/maintenance/run.php' ]; } - // @phan-suppress-next-line PhanDeprecatedFunction $result = Shell::makeScriptCommand( $dataDumpConfig[$type]['generate']['script'] ?? '', $generate, $scriptOptions - ) - ->limits( $dataDumpLimits ) - ->restrict( Shell::RESTRICT_NONE ) + )->limits( $dataDumpLimits ) + ->disableSandbox() ->includeStderr() ->execute() ->getExitCode(); @@ -76,10 +74,9 @@ public function run() { $dataDumpConfig[$type]['generate']['options'] ); - // @phan-suppress-next-line PhanDeprecatedFunction $result = Shell::command( $command ) ->limits( $dataDumpLimits ) - ->restrict( Shell::RESTRICT_NONE ) + ->disableSandbox() ->includeStderr() ->execute() ->getExitCode();