Update composer installed packages

This commit is contained in:
Clemens Schwaighofer
2022-09-06 11:16:33 +09:00
parent 4b3fbaa309
commit a8e75d158b
285 changed files with 1916 additions and 25069 deletions

View File

@@ -2,6 +2,23 @@
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [9.2.17] - 2022-08-30
### Changed
* [#928](https://github.com/sebastianbergmann/php-code-coverage/pull/928): Avoid unnecessary `is_file()` calls
* [#931](https://github.com/sebastianbergmann/php-code-coverage/pull/931): Use MD5 instead of CRC32 for static analysis cache file identifier
### Fixed
* [#926](https://github.com/sebastianbergmann/php-code-coverage/pull/926): Static Analysis cache does not work with `open_basedir`
## [9.2.16] - 2022-08-20
### Fixed
* [#926](https://github.com/sebastianbergmann/php-code-coverage/issues/926): File view has wrong colouring for the first column
## [9.2.15] - 2022-03-07
### Fixed
@@ -398,6 +415,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* This component is no longer supported on PHP 7.1
[9.2.17]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.16...9.2.17
[9.2.16]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.15...9.2.16
[9.2.15]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.14...9.2.15
[9.2.14]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.13...9.2.14
[9.2.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631...9.2.13

View File

@@ -32,7 +32,7 @@
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.13.0",
"nikic/php-parser": "^4.14",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
"sebastian/code-unit-reverse-lookup": "^2.0.2",

View File

@@ -77,7 +77,7 @@ final class CodeCoverage
private $ignoreDeprecatedCode = false;
/**
* @var PhptTestCase|string|TestCase
* @var null|PhptTestCase|string|TestCase
*/
private $currentId;

View File

@@ -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);
}
/**

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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;
}
}

View File

@@ -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;