Skip to content

Commit

Permalink
Replace deprecated Command::restrict (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 26, 2024
1 parent 4d6f822 commit 0a6c33d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions includes/jobs/DataDumpGenerateJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 0a6c33d

Please sign in to comment.