mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
fix action runner stty issue for phpunit (#109)
This commit is contained in:
@@ -12,9 +12,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace PHPUnit\Runner;
|
namespace PHPUnit\Runner;
|
||||||
|
|
||||||
use SebastianBergmann\Version as VersionId;
|
|
||||||
use function array_slice;
|
use function array_slice;
|
||||||
use function dirname;
|
|
||||||
use function explode;
|
use function explode;
|
||||||
use function implode;
|
use function implode;
|
||||||
use function strpos;
|
use function strpos;
|
||||||
@@ -44,8 +42,9 @@ final class Version
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (self::$version === '') {
|
if (self::$version === '') {
|
||||||
$cmd = "grep -Eo '\\d+.\\d+.\\d+' --color=never " . __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
|
$file = __DIR__ . '/../../vendor/phpunit/phpunit/src/Runner/Version.php';
|
||||||
self::$version = trim(exec($cmd));
|
preg_match('/\d+.\d+.\d+/', file_get_contents($file), $match);
|
||||||
|
self::$version = $match[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$version;
|
return self::$version;
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ parameters:
|
|||||||
- '#Unsafe usage of new static#'
|
- '#Unsafe usage of new static#'
|
||||||
dynamicConstantNames:
|
dynamicConstantNames:
|
||||||
- SWOOLE_VERSION
|
- SWOOLE_VERSION
|
||||||
|
- ZM_TEST_LOG_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user