Skip to content

Add PHP 8.4

Add PHP 8.4 #590

Triggered via pull request February 9, 2025 08:58
@vjikvjik
synchronize #143
php84
Status Success
Total duration 1m 17s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.4-ubuntu-latest: src/CombinedRegexp.php#L104
Escaped Mutant for Mutator "Concat": @@ @@ * https://regex101.com/r/lE1Q1S/1, https://regex101.com/r/rWg7Fj/1 */ foreach ($patterns as $i => $pattern) { - $quotedPatterns[] = $pattern . str_repeat('()', $i); + $quotedPatterns[] = str_repeat('()', $i) . $pattern; } $combinedRegexps = '(?|' . strtr(implode('|', $quotedPatterns), [self::REGEXP_DELIMITER => self::QUOTE_REPLACER]) . ')'; return self::REGEXP_DELIMITER . $combinedRegexps . self::REGEXP_DELIMITER;
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L533
Escaped Mutant for Mutator "NotIdentical": @@ @@ * never returns `false`. */ $result = preg_replace($regex, addslashes($separator) . '\1', $input); - if ($separator !== '_') { + if ($separator === '_') { $result = str_replace('_', $separator, $result); } return mb_strtolower(trim($result, $separator));
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L534
Escaped Mutant for Mutator "UnwrapStrReplace": @@ @@ */ $result = preg_replace($regex, addslashes($separator) . '\1', $input); if ($separator !== '_') { - $result = str_replace('_', $separator, $result); + $result = $result; } return mb_strtolower(trim($result, $separator)); }
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L600
Escaped Mutant for Mutator "MBString": @@ @@ public function toCamelCase(string $input): string { $input = $this->toPascalCase($input); - return mb_strtolower(mb_substr($input, 0, 1)) . mb_substr($input, 1); + return strtolower(mb_substr($input, 0, 1)) . mb_substr($input, 1); } /** * Returns given word as "snake_cased".
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L666
Escaped Mutant for Mutator "PregQuote": @@ @@ */ public function toSlug(string $input, string $replacement = '-', bool $lowercase = true): string { - $quotedReplacement = preg_quote($replacement, '/'); + $quotedReplacement = $replacement; /** * Replace all non-words character *
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L683
Escaped Mutant for Mutator "Ternary": @@ @@ * @var string $input We assume that `$input` and `$quotedReplacement` are valid UTF-8 strings, so * `preg_replace()` never returns `false`. */ - $input = preg_replace("/^(?:{$quotedReplacement})+|(?:{$quotedReplacement})+\$/u" . ($lowercase ? 'i' : ''), '', $input); + $input = preg_replace("/^(?:{$quotedReplacement})+|(?:{$quotedReplacement})+\$/u" . ($lowercase ? '' : 'i'), '', $input); return $lowercase ? strtolower($input) : $input; } /**
mutation / PHP 8.4-ubuntu-latest: src/Inflector.php#L683
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ * @var string $input We assume that `$input` and `$quotedReplacement` are valid UTF-8 strings, so * `preg_replace()` never returns `false`. */ - $input = preg_replace("/^(?:{$quotedReplacement})+|(?:{$quotedReplacement})+\$/u" . ($lowercase ? 'i' : ''), '', $input); + $input = preg_replace("/^(?:{$quotedReplacement})+|(?:{$quotedReplacement})+\$/u", '', $input); return $lowercase ? strtolower($input) : $input; } /**
mutation / PHP 8.4-ubuntu-latest: src/MemoizedCombinedRegexp.php#L39
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ } public function getMatchingPattern(string $string): string { - $this->evaluate($string); + return $this->getPatterns()[$this->getMatchingPatternPosition($string)]; } public function getMatchingPatternPosition(string $string): int
mutation / PHP 8.4-ubuntu-latest: src/StringHelper.php#L52
Escaped Mutant for Mutator "PublicVisibility": @@ @@ * * @return int The number of bytes in the given string. */ - public static function byteLength(string|null $input): int + protected static function byteLength(string|null $input): int { return mb_strlen((string) $input, '8bit'); }
mutation / PHP 8.4-ubuntu-latest: src/StringHelper.php#L54
Escaped Mutant for Mutator "MBString": @@ @@ */ public static function byteLength(string|null $input): int { - return mb_strlen((string) $input, '8bit'); + return strlen((string) $input); } /** * Returns the portion of string specified by the start and length parameters.