Update PHPStan packages #4545
Annotations
12 warnings
Mutation tests (locked, 8.1, ubuntu-latest)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/[email protected]. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
|
Mutation tests (locked, 8.1, ubuntu-latest):
src/Mapping/ExpandTags.php#L65
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
assert($definition instanceof Definition);
assert(is_array($annotations) && $annotations !== []);
$this->appendTags($definition, $annotations);
- $container->addResource(new FileResource($file));
+
}
}
/**
|
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 "Coalesce":
--- Original
+++ New
@@ @@
if (isset($tag['methods'])) {
$tag['methods'] = explode(',', $tag['methods']);
}
- $tag['async'] = (bool) ($tag['async'] ?? false);
+ $tag['async'] = (bool) (false ?? $tag['async']);
$tag['serviceId'] = $serviceId;
$routes[] = $tag;
$names[$tag['route_name']] = $serviceId;
|
Mutation tests (locked, 8.1, ubuntu-latest):
src/Routing/Mezzio/RegisterServices.php#L130
Escaped Mutant for Mutator "CastBool":
--- Original
+++ New
@@ @@
if (isset($tag['methods'])) {
$tag['methods'] = explode(',', $tag['methods']);
}
- $tag['async'] = (bool) ($tag['async'] ?? false);
+ $tag['async'] = $tag['async'] ?? false;
$tag['serviceId'] = $serviceId;
$routes[] = $tag;
$names[$tag['route_name']] = $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#L163
Escaped Mutant for Mutator "AssignCoalesce":
--- Original
+++ New
@@ @@
}
$list[Priorities::CONTENT_NEGOTIATION]['/'] ??= [];
$list[Priorities::BEFORE_CUSTOM]['/'] ??= [];
- $list[Priorities::AFTER_CUSTOM]['/'] ??= [];
+ $list[Priorities::AFTER_CUSTOM]['/'] = [];
$list[Priorities::CONTENT_NEGOTIATION]['/'][] = ContentTypeMiddleware::class;
$list[Priorities::BEFORE_CUSTOM]['/'][] = RouteMiddleware::class;
$list[Priorities::BEFORE_CUSTOM]['/'][] = BodyParamsMiddleware::class;
|
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#L302
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$container->setDefinition(MiddlewarePipe::class, $middlewarePipeline);
$aliases['.http.middleware_pipeline'] = MiddlewarePipe::class;
// -- routing
- $router = $this->createService(FastRouteRouter::class, [null, null, $this->readBCParameter($container, $this->applicationName . '.router_config', 'router_config', [])]);
+ $router = $this->createService(FastRouteRouter::class, [null, null, $this->readBCParameter($container, '.router_config' . $this->applicationName, 'router_config', [])]);
$container->setDefinition(FastRouteRouter::class, $router);
$container->setAlias(RouterInterface::class, FastRouteRouter::class);
$aliases['.http.router'] = FastRouteRouter::class;
|
Mutation tests (locked, 8.1, ubuntu-latest):
src/Routing/Mezzio/RegisterServices.php#L302
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$container->setDefinition(MiddlewarePipe::class, $middlewarePipeline);
$aliases['.http.middleware_pipeline'] = MiddlewarePipe::class;
// -- routing
- $router = $this->createService(FastRouteRouter::class, [null, null, $this->readBCParameter($container, $this->applicationName . '.router_config', 'router_config', [])]);
+ $router = $this->createService(FastRouteRouter::class, [null, null, $this->readBCParameter($container, $this->applicationName, 'router_config', [])]);
$container->setDefinition(FastRouteRouter::class, $router);
$container->setAlias(RouterInterface::class, FastRouteRouter::class);
$aliases['.http.router'] = FastRouteRouter::class;
|
Mutation tests (locked, 8.1, ubuntu-latest):
src/Routing/Mezzio/RegisterServices.php#L338
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
// -- content negotiation
$formatters = [];
foreach ($container->findTaggedServiceIds(Tags::CONTENT_FORMATTER) as $serviceId => $tags) {
- foreach ($tags as $tag) {
+ foreach (array() as $tag) {
$formatters[$tag['format']] = new Reference($serviceId);
}
}
|
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/
|