[DOC-CVS] [doc-base] master: Deprecated backtick operator with shell_exec() for PHP 8.5 (for revcheck.php)

[email protected] (Yoshinari Takaoka)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Yoshinari Takaoka (mumumu)
Date: 2025-12-28T22:22:42+09:00

Commit: https://github.com/php/doc-base/commit/845f7c4c9300dc816b31b4a4502977bad1d638b2
Raw diff: https://github.com/php/doc-base/commit/845f7c4c9300dc816b31b4a4502977bad1d638b2.diff

Deprecated backtick operator with shell_exec() for PHP 8.5 (for revcheck.php)

related to #267

Changed paths:
  M  scripts/translation/lib/GitSlowUtils.php


Diff:

diff --git a/scripts/translation/lib/GitSlowUtils.php b/scripts/translation/lib/GitSlowUtils.php
index 8dd20ddcc9..b65292efdd 100644
--- a/scripts/translation/lib/GitSlowUtils.php
+++ b/scripts/translation/lib/GitSlowUtils.php
@@ -38,15 +38,15 @@ public static function checkDiffOnlyWsChange( string $gdir , RevcheckDataFile $f
         // also ignoring insignificant ws changes in most cases we are
         // interessed.
 
-        $output = `git -C $gdir diff -b $hash -- $flnm`;
+        $output = shell_exec("git -C $gdir diff -b $hash -- $flnm");
         $onlyws = $output == "";
 
         // Slow path
 
         if ( $onlyws )
         {
-            $prev = `git -C $gdir show $hash:$flnm )`;
-            $next = `git -C $gdir show HEAD:$flnm )`;
+            $prev = shell_exec("git -C $gdir show $hash:$flnm )");
+            $next = shell_exec("git -C $gdir show HEAD:$flnm )");
 
             if ( $prev == "" || $next == "" )
             {
@@ -89,7 +89,7 @@ public static function parseAddsDels( string $gdir , RevcheckDataFile $file )
         $hash = escapeshellarg( $hash );
         $name = escapeshellarg( $name );
 
-        $output = `git -C $gdir diff --numstat $hash -- $name`;
+        $output = shell_exec("git -C $gdir diff --numstat $hash -- $name");
         if ( $output )
         {
             preg_match( '/(\d+)\s+(\d+)/' , $output , $matches );
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.