Skip to content

feat: add support for PHP 8.4 #47

feat: add support for PHP 8.4

feat: add support for PHP 8.4 #47

Triggered via push November 21, 2024 21:48
Status Success
Total duration 3m 26s
Artifacts

mutation.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation tests
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/cache@v3, 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: src/Cache/MapperCacheWarmer.php#L21
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function warmUp(string $cacheDir, string $buildDir = null) : array { - $this->mapperBuilder->warmup(); + foreach ($this->classesToWarmup->getProvidedServices() as $class) { $this->mapperBuilder->warmup($class); }
Mutation tests: src/Cache/MapperCacheWarmer.php#L32
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ } public function isOptional() : bool { - return true; + return false; } }
Mutation tests: src/Console/ConsoleMappingErrorPrinter.php#L22
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ public function __invoke(ConsoleErrorEvent $event) : void { $error = $event->getError(); - if ($error instanceof MappingError) { + if (true) { $io = new SymfonyStyle($event->getInput(), $event->getOutput()); (new MappingErrorOutput($io, $this->mappingErrorsToOutput))->print($error); } } }
Mutation tests: src/Console/MappingErrorOutput.php#L39
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ $this->io->writeln("A total of {$count} errors were found while trying to map to `{$node->type()}`"); $cells = array_map(fn(NodeMessage $message) => [$message->node()->path(), $message->toString()], array_slice($messages, 0, $this->maxEntries)); $this->io->table(['path', 'message'], $cells); - if ($count > $this->maxEntries) { + if ($count >= $this->maxEntries) { $remaining = $count - $this->maxEntries; $this->io->writeln("and {$remaining} more…"); }
Mutation tests: src/Console/MappingErrorOutput.php#L45
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $remaining = $count - $this->maxEntries; $this->io->writeln("and {$remaining} more…"); } - $this->io->info('The above message was generated by the Valinor Bundle, it can be disabled in the configuration of the bundle.'); + } }
Mutation tests: src/DependencyInjection/CompilerPass/MapperConfigurationPass.php#L32
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || $value->getClass() === null) { return $value; } - $constructor = $this->getConstructor($value, false); + $constructor = $this->getConstructor($value, true); if ($constructor === null) { return $value; }
Mutation tests: src/DependencyInjection/CompilerPass/MapperConfigurationPass.php#L41
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ } foreach ($constructor->getParameters() as $parameter) { $type = $parameter->getType(); - if (!$type instanceof ReflectionNamedType || $type->getName() !== TreeMapper::class) { + if (!true || $type->getName() !== TreeMapper::class) { continue; } $attributes = $parameter->getAttributes(MapperBuilderConfiguratorAttribute::class, ReflectionAttribute::IS_INSTANCEOF);
Mutation tests: src/DependencyInjection/CompilerPass/MapperConfigurationPass.php#L41
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ } foreach ($constructor->getParameters() as $parameter) { $type = $parameter->getType(); - if (!$type instanceof ReflectionNamedType || $type->getName() !== TreeMapper::class) { + if (!$type instanceof ReflectionNamedType && $type->getName() !== TreeMapper::class) { continue; } $attributes = $parameter->getAttributes(MapperBuilderConfiguratorAttribute::class, ReflectionAttribute::IS_INSTANCEOF);
Mutation tests: src/DependencyInjection/Factory/CacheFactory.php#L18
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ public static function create(string $cacheDir, bool $watchFiles) : CacheInterface { $cache = new FileSystemCache($cacheDir); - if ($watchFiles) { + if (!$watchFiles) { $cache = new FileWatchingCache($cache); } return $cache; } }