Update composer installed packages
This commit is contained in:
@@ -77,7 +77,7 @@ final class CodeCoverage
|
||||
private $ignoreDeprecatedCode = false;
|
||||
|
||||
/**
|
||||
* @var PhptTestCase|string|TestCase
|
||||
* @var null|PhptTestCase|string|TestCase
|
||||
*/
|
||||
private $currentId;
|
||||
|
||||
|
||||
@@ -100,11 +100,7 @@ final class Filter
|
||||
|
||||
public function isExcluded(string $filename): bool
|
||||
{
|
||||
if (!$this->isFile($filename)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !isset($this->files[$filename]);
|
||||
return !isset($this->files[$filename]) || !$this->isFile($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td class="{{classes_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}} big">{{lines_bar}}</td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_executed_percent}}</div></td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_number}}</div></td>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td class="{{classes_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}} big">{{lines_bar}}</td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_executed_percent}}</div></td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_number}}</div></td>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td class="{{methods_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}} big">{{lines_bar}}</td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_executed_percent}}</div></td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_number}}</div></td>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<tr>
|
||||
<td class="{{methods_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}}">{{name}}</td>
|
||||
<td class="{{lines_level}} big">{{lines_bar}}</td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_executed_percent}}</div></td>
|
||||
<td class="{{lines_level}} small"><div align="right">{{lines_number}}</div></td>
|
||||
|
||||
@@ -9,15 +9,14 @@
|
||||
*/
|
||||
namespace SebastianBergmann\CodeCoverage\StaticAnalysis;
|
||||
|
||||
use function assert;
|
||||
use function crc32;
|
||||
use function file_get_contents;
|
||||
use function file_put_contents;
|
||||
use function implode;
|
||||
use function is_file;
|
||||
use function md5;
|
||||
use function serialize;
|
||||
use GlobIterator;
|
||||
use SebastianBergmann\CodeCoverage\Util\Filesystem;
|
||||
use SplFileInfo;
|
||||
use SebastianBergmann\FileIterator\Facade as FileIteratorFacade;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
|
||||
@@ -50,10 +49,6 @@ final class CachingFileAnalyser implements FileAnalyser
|
||||
|
||||
$this->analyser = $analyser;
|
||||
$this->directory = $directory;
|
||||
|
||||
if (self::$cacheVersion === null) {
|
||||
$this->calculateCacheVersion();
|
||||
}
|
||||
}
|
||||
|
||||
public function classesIn(string $filename): array
|
||||
@@ -165,19 +160,24 @@ final class CachingFileAnalyser implements FileAnalyser
|
||||
|
||||
private function cacheFile(string $filename): string
|
||||
{
|
||||
return $this->directory . DIRECTORY_SEPARATOR . hash('sha256', $filename . crc32(file_get_contents($filename)) . self::$cacheVersion);
|
||||
return $this->directory . DIRECTORY_SEPARATOR . md5($filename . "\0" . file_get_contents($filename) . "\0" . self::cacheVersion());
|
||||
}
|
||||
|
||||
private function calculateCacheVersion(): void
|
||||
private static function cacheVersion(): string
|
||||
{
|
||||
$buffer = '';
|
||||
|
||||
foreach (new GlobIterator(__DIR__ . '/*.php') as $file) {
|
||||
assert($file instanceof SplFileInfo);
|
||||
|
||||
$buffer .= file_get_contents($file->getPathname());
|
||||
if (self::$cacheVersion !== null) {
|
||||
return self::$cacheVersion;
|
||||
}
|
||||
|
||||
self::$cacheVersion = (string) crc32($buffer);
|
||||
$buffer = [];
|
||||
|
||||
foreach ((new FileIteratorFacade)->getFilesAsArray(__DIR__, '.php') as $file) {
|
||||
$buffer[] = $file;
|
||||
$buffer[] = file_get_contents($file);
|
||||
}
|
||||
|
||||
self::$cacheVersion = md5(implode("\0", $buffer));
|
||||
|
||||
return self::$cacheVersion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ final class Version
|
||||
public static function id(): string
|
||||
{
|
||||
if (self::$version === null) {
|
||||
self::$version = (new VersionId('9.2.15', dirname(__DIR__)))->getVersion();
|
||||
self::$version = (new VersionId('9.2.17', dirname(__DIR__)))->getVersion();
|
||||
}
|
||||
|
||||
return self::$version;
|
||||
|
||||
Reference in New Issue
Block a user