Skip to content

For Contexts, rely on token constants + Add MySQL 8.4 context #604

For Contexts, rely on token constants + Add MySQL 8.4 context

For Contexts, rely on token constants + Add MySQL 8.4 context #604

Triggered via pull request August 6, 2024 10:57
Status Failure
Total duration 1m 28s
Artifacts

mutation-tests.yml

on: pull_request
Matrix: tests
Fit to window
Zoom out
Zoom in

Annotations

1 error and 12 warnings
Mutation tests with PHP 8.2
Process completed with exit code 1.
Mutation tests with PHP 8.2
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Mutation tests with PHP 8.2
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Mutation tests with PHP 8.2: src/Token.php#L117
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ * * If no processing can be done it will return the initial string. */ - public function extract() : bool|float|int|string + protected function extract() : bool|float|int|string { switch ($this->type) { case TokenType::Keyword:
Mutation tests with PHP 8.2: src/Token.php#L139
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $ret = str_replace('--', '', $this->token); // e.g. ---42 === -42 if ($this->flags & self::FLAG_NUMBER_HEX) { - $ret = str_replace(['-', '+'], '', $this->token); + $ret = str_replace(['+'], '', $this->token); if ($this->flags & self::FLAG_NUMBER_NEGATIVE) { $ret = -hexdec($ret); } else {
Mutation tests with PHP 8.2: src/Token.php#L139
Escaped Mutant for Mutator "UnwrapStrReplace": --- Original +++ New @@ @@ $ret = str_replace('--', '', $this->token); // e.g. ---42 === -42 if ($this->flags & self::FLAG_NUMBER_HEX) { - $ret = str_replace(['-', '+'], '', $this->token); + $ret = $this->token; if ($this->flags & self::FLAG_NUMBER_NEGATIVE) { $ret = -hexdec($ret); } else {
Mutation tests with PHP 8.2: src/Token.php#L146
Escaped Mutant for Mutator "CastFloat": --- Original +++ New @@ @@ $ret = hexdec($ret); } } elseif ($this->flags & self::FLAG_NUMBER_APPROXIMATE || $this->flags & self::FLAG_NUMBER_FLOAT) { - $ret = (float) $ret; + $ret = $ret; } elseif (!($this->flags & self::FLAG_NUMBER_BINARY)) { $ret = (int) $ret; }
Mutation tests with PHP 8.2: src/Token.php#L156
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ case TokenType::String: // Trims quotes. $str = $this->token; - $str = mb_substr($str, 1, -1, 'UTF-8'); + $str = substr($str, 1, -1); // Removes surrounding quotes. $quote = $this->token[0]; $str = str_replace($quote . $quote, $quote, $str);
Mutation tests with PHP 8.2: src/Token.php#L160
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ $str = mb_substr($str, 1, -1, 'UTF-8'); // Removes surrounding quotes. $quote = $this->token[0]; - $str = str_replace($quote . $quote, $quote, $str); + $str = str_replace($quote, $quote, $str); // Finally unescapes the string. // // `stripcslashes` replaces escape sequences with their
Mutation tests with PHP 8.2: src/Token.php#L160
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ $str = mb_substr($str, 1, -1, 'UTF-8'); // Removes surrounding quotes. $quote = $this->token[0]; - $str = str_replace($quote . $quote, $quote, $str); + $str = str_replace($quote, $quote, $str); // Finally unescapes the string. // // `stripcslashes` replaces escape sequences with their
Mutation tests with PHP 8.2: src/Token.php#L160
Escaped Mutant for Mutator "UnwrapStrReplace": --- Original +++ New @@ @@ $str = mb_substr($str, 1, -1, 'UTF-8'); // Removes surrounding quotes. $quote = $this->token[0]; - $str = str_replace($quote . $quote, $quote, $str); + $str = $str; // Finally unescapes the string. // // `stripcslashes` replaces escape sequences with their
Mutation tests with PHP 8.2: src/Token.php#L180
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ if (isset($str[0]) && $str[0] === '@') { // `mb_strlen($str)` must be used instead of `null` because // in PHP 5.3- the `null` parameter isn't handled correctly. - $str = mb_substr($str, !empty($str[1]) && $str[1] === '@' ? 2 : 1, mb_strlen($str), 'UTF-8'); + $str = substr($str, !empty($str[1]) && $str[1] === '@' ? 2 : 1, mb_strlen($str)); } if (isset($str[0]) && $str[0] === ':') { $str = mb_substr($str, 1, mb_strlen($str), 'UTF-8');
Mutation tests with PHP 8.2: src/Token.php#L182
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ if (isset($str[0]) && $str[0] === '@') { // `mb_strlen($str)` must be used instead of `null` because // in PHP 5.3- the `null` parameter isn't handled correctly. - $str = mb_substr($str, !empty($str[1]) && $str[1] === '@' ? 2 : 1, mb_strlen($str), 'UTF-8'); + $str = mb_substr($str, !empty($str[2]) && $str[1] === '@' ? 2 : 1, mb_strlen($str), 'UTF-8'); } if (isset($str[0]) && $str[0] === ':') { $str = mb_substr($str, 1, mb_strlen($str), 'UTF-8');