fix action runner stty issue for phpunit (#109)

This commit is contained in:
Jerry Ma
2022-04-30 20:34:32 +08:00
committed by GitHub
parent f1c730962b
commit 47ce0a8e9c
2 changed files with 4 additions and 4 deletions

View File

@@ -12,9 +12,7 @@ declare(strict_types=1);
namespace PHPUnit\Runner;
use SebastianBergmann\Version as VersionId;
use function array_slice;
use function dirname;
use function explode;
use function implode;
use function strpos;
@@ -44,8 +42,9 @@ final class Version
}
if (self::$version === '') {
$cmd = "grep -Eo '\\d+.\\d+.\\d+' --color=never " . __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
self::$version = trim(exec($cmd));
$file = __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
preg_match('/\d+.\d+.\d+/', file_get_contents($file), $match);
self::$version = $match[0];
}
return self::$version;

View File

@@ -10,3 +10,4 @@ parameters:
- '#Unsafe usage of new static#'
dynamicConstantNames:
- SWOOLE_VERSION
- ZM_TEST_LOG_DEBUG