Skip to content

Normalise extension requirements #2674

Normalise extension requirements

Normalise extension requirements #2674

Triggered via pull request November 12, 2024 16:29
Status Failure
Total duration 1m 30s
Artifacts

integrate.yaml

on: pull_request
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation Tests
Matrix: Refactoring
Matrix: Security Analysis
Matrix: Static Code Analysis
Matrix: Tests
Fit to window
Zoom out
Zoom in

Annotations

1 error and 10 warnings
Mutation Tests (7.4, locked)
Process completed with exit code 1.
Mutation Tests (7.4, locked): src/ChainNormalizer.php#L27
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ private array $normalizers; public function __construct(Normalizer ...$normalizers) { - $this->normalizers = \array_values($normalizers); + $this->normalizers = $normalizers; } public function normalize(Json $json) : Json {
Mutation Tests (7.4, locked): src/Exception/InvalidIndentStyle.php#L39
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Style needs to be one of "%s", but "%s" is not.', \implode('", "', $allowedStyles), $style)); $exception->style = $style; - $exception->allowedStyles = \array_values($allowedStyles); + $exception->allowedStyles = $allowedStyles; return $exception; } public function style() : string
Mutation Tests (7.4, locked): src/Exception/NormalizedInvalidAccordingToSchema.php#L35
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Normalized JSON is not valid according to schema "%s".', $schemaUri)); $exception->schemaUri = $schemaUri; - $exception->errors = \array_values($errors); + $exception->errors = $errors; return $exception; } public function schemaUri() : string
Mutation Tests (7.4, locked): src/Exception/OriginalInvalidAccordingToSchema.php#L35
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Original JSON is not valid according to schema "%s".', $schemaUri)); $exception->schemaUri = $schemaUri; - $exception->errors = \array_values($errors); + $exception->errors = $errors; return $exception; } public function schemaUri() : string
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L106
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if (1 === \preg_match(self::PLATFORM_PACKAGE_REGEX, $requirement)) { return \preg_replace(['/^php/', '/^hhvm/', '/^ext/', '/^lib/', '/^\\D/'], ['0-$0', '1-$0', '2-$0', '3-$0', '4-$0'], $requirement); } - return '5-' . $requirement; + return $requirement; }; \uksort($packages, static function (string $a, string $b) use($prefix) : int { return \strnatcmp($prefix($a), $prefix($b));
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L106
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if (1 === \preg_match(self::PLATFORM_PACKAGE_REGEX, $requirement)) { return \preg_replace(['/^php/', '/^hhvm/', '/^ext/', '/^lib/', '/^\\D/'], ['0-$0', '1-$0', '2-$0', '3-$0', '4-$0'], $requirement); } - return '5-' . $requirement; + return '5-'; }; \uksort($packages, static function (string $a, string $b) use($prefix) : int { return \strnatcmp($prefix($a), $prefix($b));
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L106
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ if (1 === \preg_match(self::PLATFORM_PACKAGE_REGEX, $requirement)) { return \preg_replace(['/^php/', '/^hhvm/', '/^ext/', '/^lib/', '/^\\D/'], ['0-$0', '1-$0', '2-$0', '3-$0', '4-$0'], $requirement); } - return '5-' . $requirement; + return $requirement . '5-'; }; \uksort($packages, static function (string $a, string $b) use($prefix) : int { return \strnatcmp($prefix($a), $prefix($b));
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L131
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ */ private static function mergeDuplicateExtensions($packages) : array { - foreach ($packages as $name => $value) { + foreach (array() as $name => $value) { if (!isset($name[4]) || \strtolower(\substr($name, 0, 4)) !== 'ext-') { continue; }
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L132
Escaped Mutant for Mutator "UnwrapSubstr": --- Original +++ New @@ @@ private static function mergeDuplicateExtensions($packages) : array { foreach ($packages as $name => $value) { - if (!isset($name[4]) || \strtolower(\substr($name, 0, 4)) !== 'ext-') { + if (!isset($name[4]) || \strtolower($name) !== 'ext-') { continue; } $newName = \str_replace(' ', '-', \strtolower($name));
Mutation Tests (7.4, locked): src/Vendor/Composer/PackageHashNormalizer.php#L132
Escaped Mutant for Mutator "NotIdentical": --- Original +++ New @@ @@ private static function mergeDuplicateExtensions($packages) : array { foreach ($packages as $name => $value) { - if (!isset($name[4]) || \strtolower(\substr($name, 0, 4)) !== 'ext-') { + if (!isset($name[4]) || \strtolower(\substr($name, 0, 4)) === 'ext-') { continue; } $newName = \str_replace(' ', '-', \strtolower($name));