Remove support for PHP 8.1 and add support to PHP 8.3 #49
ci.yml
on: pull_request
Matrix: ci / unit-tests
Matrix: ci / static-analysis
Matrix: ci / mutation-tests
Matrix: ci / upload-coverage
ci
/
delete-artifacts
3s
Annotations
20 warnings
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L48
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$this->downloadDbFile($compressedFile, $handleProgress);
$tempFullPath = $this->extractDbFile($compressedFile, $tempDir);
$this->copyNewDbFile($tempFullPath);
- $this->deleteTempFiles([$compressedFile, $tempFullPath]);
+ $this->deleteTempFiles([$tempFullPath]);
}
/**
* @param (callable(int $total, int $downloaded): void) | null $handleProgress
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L57
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
private function downloadDbFile(string $dest, ?callable $handleProgress = null) : void
{
try {
- $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
+ $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
} catch (Throwable $e) {
throw DbUpdateException::forFailedDownload($e);
}
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L60
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
private function downloadDbFile(string $dest, ?callable $handleProgress = null) : void
{
try {
- $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
+ $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT > $this->options->connectionTimeout]);
} catch (Throwable $e) {
throw DbUpdateException::forFailedDownload($e);
}
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L72
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
try {
$phar = new PharData($compressedFile);
$internalPathToDb = sprintf('%s/%s', $phar->getBasename(), self::DB_DECOMPRESSED_FILE);
- $phar->extractTo($tempDir, $internalPathToDb, true);
+
return sprintf('%s/%s', $tempDir, $internalPathToDb);
} catch (Throwable $e) {
throw DbUpdateException::forFailedExtraction($compressedFile, $e);
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L85
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
$destination = $this->options->dbLocation;
try {
- $this->filesystem->copy($from, $destination, true);
+ $this->filesystem->copy($from, $destination, false);
$this->filesystem->chmod([$destination], 0666);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([], 0666);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([$destination], 437);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([$destination], 439);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.2):
src/GeoLite2/DbUpdater.php#L87
Escaped Mutant for Mutator "Catch_":
--- Original
+++ New
@@ @@
try {
$this->filesystem->copy($from, $destination, true);
$this->filesystem->chmod([$destination], 0666);
- } catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
+ } catch (FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
}
|
ci / mutation-tests (8.2):
src/GeoLite2/GeoLite2Options.php#L22
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public readonly string $downloadFrom;
public function __construct(private readonly ?string $licenseKey = null, public readonly string $dbLocation = '', public readonly string $tempDir = '', public readonly float $connectionTimeout = 15.0)
{
- $this->downloadFrom = str_replace('{license_key}', $this->licenseKey ?? '', self::DOWNLOAD_FROM_PATTERN);
+ $this->downloadFrom = str_replace('{license_key}', '' ?? $this->licenseKey, self::DOWNLOAD_FROM_PATTERN);
}
public function hasLicenseKey() : bool
{
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L48
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$this->downloadDbFile($compressedFile, $handleProgress);
$tempFullPath = $this->extractDbFile($compressedFile, $tempDir);
$this->copyNewDbFile($tempFullPath);
- $this->deleteTempFiles([$compressedFile, $tempFullPath]);
+ $this->deleteTempFiles([$tempFullPath]);
}
/**
* @param (callable(int $total, int $downloaded): void) | null $handleProgress
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L57
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
private function downloadDbFile(string $dest, ?callable $handleProgress = null) : void
{
try {
- $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
+ $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
} catch (Throwable $e) {
throw DbUpdateException::forFailedDownload($e);
}
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L60
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
private function downloadDbFile(string $dest, ?callable $handleProgress = null) : void
{
try {
- $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT => $this->options->connectionTimeout]);
+ $this->httpClient->request(RequestMethod::METHOD_GET, $this->options->downloadFrom, [RequestOptions::SINK => $dest, RequestOptions::PROGRESS => $handleProgress, RequestOptions::CONNECT_TIMEOUT > $this->options->connectionTimeout]);
} catch (Throwable $e) {
throw DbUpdateException::forFailedDownload($e);
}
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L72
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
try {
$phar = new PharData($compressedFile);
$internalPathToDb = sprintf('%s/%s', $phar->getBasename(), self::DB_DECOMPRESSED_FILE);
- $phar->extractTo($tempDir, $internalPathToDb, true);
+
return sprintf('%s/%s', $tempDir, $internalPathToDb);
} catch (Throwable $e) {
throw DbUpdateException::forFailedExtraction($compressedFile, $e);
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L85
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
$destination = $this->options->dbLocation;
try {
- $this->filesystem->copy($from, $destination, true);
+ $this->filesystem->copy($from, $destination, false);
$this->filesystem->chmod([$destination], 0666);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([], 0666);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([$destination], 437);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L86
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$destination = $this->options->dbLocation;
try {
$this->filesystem->copy($from, $destination, true);
- $this->filesystem->chmod([$destination], 0666);
+ $this->filesystem->chmod([$destination], 439);
} catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
|
ci / mutation-tests (8.3):
src/GeoLite2/DbUpdater.php#L87
Escaped Mutant for Mutator "Catch_":
--- Original
+++ New
@@ @@
try {
$this->filesystem->copy($from, $destination, true);
$this->filesystem->chmod([$destination], 0666);
- } catch (FilesystemException\FileNotFoundException|FilesystemException\IOException $e) {
+ } catch (FilesystemException\IOException $e) {
throw DbUpdateException::forFailedCopyToDestination($destination, $e);
}
}
|
ci / mutation-tests (8.3):
src/GeoLite2/GeoLite2Options.php#L22
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public readonly string $downloadFrom;
public function __construct(private readonly ?string $licenseKey = null, public readonly string $dbLocation = '', public readonly string $tempDir = '', public readonly float $connectionTimeout = 15.0)
{
- $this->downloadFrom = str_replace('{license_key}', $this->licenseKey ?? '', self::DOWNLOAD_FROM_PATTERN);
+ $this->downloadFrom = str_replace('{license_key}', '' ?? $this->licenseKey, self::DOWNLOAD_FROM_PATTERN);
}
public function hasLicenseKey() : bool
{
|