Skip to content

Refactored async await in discovery (#309) #28

Refactored async await in discovery (#309)

Refactored async await in discovery (#309) #28

Triggered via push August 29, 2024 08:18
Status Success
Total duration 6m 50s
Artifacts 1

tests.yaml

on: push
Matrix: PHP Tests
Matrix: PHP Tests With Code Coverage
Matrix: PHP Tests For Mutants
Fit to window
Zoom out
Zoom in

Annotations

14 warnings
PHP Tests (8.2, ubuntu-latest) / Code Tests (PHP 8.2)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
PHP Tests With Code Coverage (8.2, ubuntu-latest) / Code Coverage (PHP 8.2)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/upload-artifact@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L60
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ { try { // Start with 12 random bytes - $message = pack('C*', ...(array) unpack('C*', random_bytes(12))); + $message = pack('C*', ...unpack('C*', random_bytes(12))); } catch (Throwable $ex) { throw new Exceptions\Encrypt('Preparing payload header failed', $ex->getCode(), $ex); }
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L81
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $message = $message . str_repeat(chr(0), 16 - strlen($message) % 16); // Encrypt the payload $cipherText = openssl_encrypt($message, 'AES-128-CBC', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); - if ($cipherText === false) { + if ($cipherText === true) { throw new Exceptions\Encrypt('Payload could not be encrypted'); } // Compute HMAC-SHA-256
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L99
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ public static function decryptPayload(string $data, string $key, string $iv, string $hmacKey) : string { $decodedWithSignature = base64_decode($data, true); - if ($decodedWithSignature === false) { + if ($decodedWithSignature === true) { throw new Exceptions\Decrypt('Payload could not be decoded'); } $decoded = substr($decodedWithSignature, 0, -self::SIGNATURE_BYTES_LENGTH);
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L120
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ throw new Exceptions\Decrypt('Payload could not be decrypted. Signatures are different'); } $result = openssl_decrypt($decoded, 'AES-128-CBC', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); - if ($result === false) { + if ($result === true) { throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = unpack('C*', $result);
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L126
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = unpack('C*', $result); - if ($decrypted === false) { + if ($decrypted === true) { throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = array_values($decrypted);
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L135
Escaped Mutant for Mutator "LessThan": --- Original +++ New @@ @@ $decrypted = array_values($decrypted); $message = []; // The valid decrypted data starts at byte offset 16 - for ($i = 16; $i < count($decrypted); $i++) { + for ($i = 16; $i <= count($decrypted); $i++) { // Strip ending if ($decrypted[$i] === 0) { break;
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/API/Crypto.php#L138
Escaped Mutant for Mutator "Break_": --- Original +++ New @@ @@ for ($i = 16; $i < count($decrypted); $i++) { // Strip ending if ($decrypted[$i] === 0) { - break; + continue; } $message[] = $decrypted[$i]; }
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/Commands/Discover.php#L89
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ private DateTimeInterface|null $executedTime = null; public function __construct(private readonly Api\TelevisionApiFactory $televisionApiFactory, private readonly Helpers\Device $deviceHelper, private readonly Helpers\DeviceProperty $deviceProperty, private readonly Viera\Logger $logger, private readonly DevicesModels\Entities\Devices\DevicesRepository $devicesRepository, private readonly DevicesModels\Configuration\Connectors\Repository $connectorsConfigurationRepository, private readonly DevicesModels\Configuration\Devices\Repository $devicesConfigurationRepository, private readonly DateTimeFactory\Factory $dateTimeFactory, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/Commands/Discover.php#L97
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('Viera connector discovery')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Connector ID or identifier', true)])); + } /** * @throws ApplicationExceptions\InvalidState
PHP Tests For Mutants (8.2, ubuntu-latest) / Mutation Tests (PHP 8.2): src/Commands/Discover.php#L101
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('Viera connector discovery')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Connector ID or identifier', true)])); + $this->setName(self::NAME)->setDescription('Viera connector discovery')->setDefinition(new Input\InputDefinition([])); } /** * @throws ApplicationExceptions\InvalidState
Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "Logs - Mutations". Please update your workflow to use v4 of the artifact actions. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

Artifacts

Produced during runtime
Name Size
Logs - Mutations Expired
3.65 MB