Skip to content

Update PHPStan packages #4328

Update PHPStan packages

Update PHPStan packages #4328

Triggered via push August 28, 2024 07:38
Status Success
Total duration 1m 33s
Artifacts
Matrix: Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
Mutation tests (locked, 8.1, ubuntu-latest)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/[email protected]. 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 (locked, 8.1, ubuntu-latest): src/Routing/ErrorHandling/RegisterDefaultComponents.php#L34
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ } private function hasService(ContainerBuilder $container, string $service) : bool { - return $container->hasAlias($service) || $container->hasDefinition($service); + return $container->hasAlias($service) && $container->hasDefinition($service); } }
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L130
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ if (isset($tag['methods'])) { $tag['methods'] = explode(',', $tag['methods']); } - $tag['async'] = (bool) ($tag['async'] ?? false); + $tag['async'] = (bool) ($tag['async'] ?? true); $tag['serviceId'] = $serviceId; $routes[] = $tag; $names[$tag['route_name']] = $serviceId;
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L154
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ foreach ($container->findTaggedServiceIds(Tags::HTTP_MIDDLEWARE) as $serviceId => $tags) { foreach ($tags as $tag) { $priority = (int) ($tag['priority'] ?? 0); - $path = (string) ($tag['path'] ?? '/'); + $path = $tag['path'] ?? '/'; $list[$priority][$path] ??= []; $list[$priority][$path][] = $serviceId; }
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L156
Escaped Mutant for Mutator "AssignCoalesce": --- Original +++ New @@ @@ foreach ($tags as $tag) { $priority = (int) ($tag['priority'] ?? 0); $path = (string) ($tag['path'] ?? '/'); - $list[$priority][$path] ??= []; + $list[$priority][$path] = []; $list[$priority][$path][] = $serviceId; } }
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L162
Escaped Mutant for Mutator "AssignCoalesce": --- Original +++ New @@ @@ } } $list[Priorities::CONTENT_NEGOTIATION]['/'] ??= []; - $list[Priorities::BEFORE_CUSTOM]['/'] ??= []; + $list[Priorities::BEFORE_CUSTOM]['/'] = []; $list[Priorities::AFTER_CUSTOM]['/'] ??= []; $list[Priorities::CONTENT_NEGOTIATION]['/'][] = ContentTypeMiddleware::class; $list[Priorities::BEFORE_CUSTOM]['/'][] = RouteMiddleware::class;
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L201
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ } } } - return $prioritised; + return count($prioritised) > 1 ? array_slice($prioritised, 0, 1, true) : $prioritised; } /** @param string[] $services */ private function registerServiceLocator(ContainerBuilder $container, array $services) : Reference
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L213
Escaped Mutant for Mutator "UnwrapArrayCombine": --- Original +++ New @@ @@ { return ServiceLocatorTagPass::register($container, array_map(static function (string $id) : Reference { return new Reference($id); - }, array_combine($services, $services))); + }, $services)); } /** @param mixed[] $arguments */ private function createService(string $class, array $arguments = []) : Definition
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L221
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ /** @param mixed[] $arguments */ private function createService(string $class, array $arguments = []) : Definition { - return (new Definition($class, $arguments))->setPublic(false); + return (new Definition($class, $arguments))->setPublic(true); } /** * @param list<array{path: string, route_name: string, behavior: string, methods?: list<string>, async: bool, serviceId: string}> $routes
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L248
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ foreach ($routes as $route) { // @phpstan-ignore-next-line $services[] = $this->{self::BEHAVIORS[$route['behavior']]['callback']}('http.route.' . $route['route_name'], $route, $container); - $aliases['.http.route.' . $route['route_name']] = 'http.route.' . $route['route_name']; + $aliases[$route['route_name'] . '.http.route.'] = 'http.route.' . $route['route_name']; } $middleware = []; foreach ($middlewareList as $path => $servicesIds) {
Mutation tests (locked, 8.1, ubuntu-latest): src/Routing/Mezzio/RegisterServices.php#L248
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ foreach ($routes as $route) { // @phpstan-ignore-next-line $services[] = $this->{self::BEHAVIORS[$route['behavior']]['callback']}('http.route.' . $route['route_name'], $route, $container); - $aliases['.http.route.' . $route['route_name']] = 'http.route.' . $route['route_name']; + $aliases[$route['route_name']] = 'http.route.' . $route['route_name']; } $middleware = []; foreach ($middlewareList as $path => $servicesIds) {
Mutation tests (locked, 8.1, ubuntu-latest)
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/