Bläddra i källkod

Fix deprecations

Jordi Boggiano 2 månader sedan
förälder
incheckning
e01926b069

+ 1 - 1
src/Monolog/Processor/GitProcessor.php

@@ -64,7 +64,7 @@ class GitProcessor implements ProcessorInterface
             return self::$cache;
             return self::$cache;
         }
         }
 
 
-        $branches = `git branch -v --no-abbrev`;
+        $branches = shell_exec('git branch -v --no-abbrev');
         if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
         if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
             return self::$cache = [
             return self::$cache = [
                 'branch' => $matches[1],
                 'branch' => $matches[1],

+ 1 - 1
src/Monolog/Processor/MercurialProcessor.php

@@ -63,7 +63,7 @@ class MercurialProcessor implements ProcessorInterface
             return self::$cache;
             return self::$cache;
         }
         }
 
 
-        $result = explode(' ', trim(`hg id -nb`));
+        $result = explode(' ', trim((string) shell_exec('hg id -nb')));
 
 
         if (count($result) >= 3) {
         if (count($result) >= 3) {
             return self::$cache = [
             return self::$cache = [

+ 1 - 1
tests/Monolog/Processor/MercurialProcessorTest.php

@@ -31,7 +31,7 @@ class MercurialProcessorTest extends TestCase
             return;
             return;
         }
         }
 
 
-        `hg init`;
+        shell_exec('hg init');
         $processor = new MercurialProcessor();
         $processor = new MercurialProcessor();
         $record = $processor($this->getRecord());
         $record = $processor($this->getRecord());