do not crash the GraphViz formatter if no config is given #1863
test.yml
on: pull_request
Matrix: deptrac
Matrix: infection
Matrix: unit-tests
Annotations
18 warnings
unit-tests (ubuntu-20.04, 8.2, true)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
unit-tests (ubuntu-20.04, 8.1, false)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
deptrac (ubuntu-20.04, 8.2, true)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
deptrac (ubuntu-20.04, 8.2, true)
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/
|
deptrac (ubuntu-20.04, 8.1, false)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
deptrac (ubuntu-20.04, 8.1, false)
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/
|
infection (ubuntu-20.04, 8.1)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
infection (ubuntu-20.04, 8.1):
src/Contract/Analyser/EventHelper.php#L37
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
public function shouldViolationBeSkipped(string $depender, string $dependent) : bool
{
$skippedViolation = $this->skippedViolations[$depender] ?? [];
- $matched = [] !== $skippedViolation && in_array($dependent, $skippedViolation, true);
+ $matched = [] !== $skippedViolation || in_array($dependent, $skippedViolation, true);
if (!$matched) {
return false;
}
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/AstMap/AstMap.php#L110
Escaped Mutant for Mutator "AssignCoalesce":
--- Original
+++ New
@@ @@
*/
private function recursivelyResolveDependencies(AstInherit $inheritDependency, ArrayObject $alreadyResolved = null, SplStack $pathStack = null) : iterable
{
- $alreadyResolved ??= new ArrayObject();
+ $alreadyResolved = new ArrayObject();
/** @var ArrayObject<string, true> $alreadyResolved */
if (null === $pathStack) {
/** @var SplStack<AstInherit> $pathStack */
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/AstMap/AstMap.php#L133
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
return [];
}
foreach ($classReference->inherits as $inherit) {
- $alreadyResolved[$className] = true;
+ $alreadyResolved[$className] = false;
/** @var AstInherit[] $path */
$path = iterator_to_array($pathStack);
(yield $inherit->replacePath($path));
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/AstMap/ClassLike/ClassLikeReference.php#L28
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
* @param AstInherit[] $inherits
* @param DependencyToken[] $dependencies
*/
- public function __construct(private readonly ClassLikeToken $classLikeName, ClassLikeType $classLikeType = null, public readonly array $inherits = [], public readonly array $dependencies = [], public readonly bool $isInternal = false, private readonly ?FileReference $fileReference = null)
+ public function __construct(private readonly ClassLikeToken $classLikeName, ClassLikeType $classLikeType = null, public readonly array $inherits = [], public readonly array $dependencies = [], public readonly bool $isInternal = true, private readonly ?FileReference $fileReference = null)
{
$this->type = $classLikeType ?? ClassLikeType::TYPE_CLASSLIKE;
}
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/AstMap/File/FileReference.php#L41
Escaped Mutant for Mutator "UnwrapArrayMap":
--- Original
+++ New
@@ @@
/** @psalm-suppress ImpureFunctionCall */
$this->classLikeReferences = array_map(fn(ClassLikeReference $classReference): ClassLikeReference => $classReference->withFileReference($this), $classLikeReferences);
/** @psalm-suppress ImpureFunctionCall */
- $this->functionReferences = array_map(fn(FunctionReference $functionReference): FunctionReference => $functionReference->withFileReference($this), $functionReferences);
+ $this->functionReferences = $functionReferences;
}
public function getFilepath() : ?string
{
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/Parser/Cache/AstFileReferenceInMemoryCache.php#L25
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
}
public function set(FileReference $fileReference) : void
{
- $filepath = (string) realpath($fileReference->filepath);
+ $filepath = realpath($fileReference->filepath);
$this->cache[$filepath] = $fileReference;
}
}
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/Parser/NikicPhpParser/FileReferenceVisitor.php#L87
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
if ($node instanceof Node\FunctionLike) {
foreach ($this->templatesFromDocs($node) as $template) {
- $this->currentReference->removeTokenTemplate($template);
+
}
}
match (true) {
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/Parser/NikicPhpParser/FileReferenceVisitor.php#L91
Escaped Mutant for Mutator "MatchArmRemoval":
--- Original
+++ New
@@ @@
}
match (true) {
$node instanceof Node\Stmt\Function_ => $this->currentReference = $this->fileReferenceBuilder,
- $node instanceof ClassLike && null !== $this->getClassReferenceName($node) => $this->currentReference = $this->fileReferenceBuilder,
$node instanceof Use_ && Use_::TYPE_NORMAL === $node->type => $this->leaveUse($node),
$node instanceof GroupUse => $this->leaveGroupUse($node),
default => null,
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/Parser/NikicPhpParser/FileReferenceVisitor.php#L125
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$name = $this->getClassReferenceName($node);
$docNodeCrate = $this->getDocNodeCrate($node);
if (null !== $name) {
- $isInternal = false;
+ $isInternal = true;
if (null !== $docNodeCrate) {
$isInternal = [] !== array_merge($docNodeCrate[0]->getTagsByName('@internal'), $docNodeCrate[0]->getTagsByName('@deptrac-internal'));
}
|
infection (ubuntu-20.04, 8.1):
src/Core/Ast/Parser/NikicPhpParser/FileReferenceVisitor.php#L127
Escaped Mutant for Mutator "UnwrapArrayMerge":
--- Original
+++ New
@@ @@
if (null !== $name) {
$isInternal = false;
if (null !== $docNodeCrate) {
- $isInternal = [] !== array_merge($docNodeCrate[0]->getTagsByName('@internal'), $docNodeCrate[0]->getTagsByName('@deptrac-internal'));
+ $isInternal = [] !== $docNodeCrate[0]->getTagsByName('@internal');
}
match (true) {
$node instanceof Interface_ => $this->enterInterface($name, $node, $isInternal),
|
infection (ubuntu-20.04, 8.1)
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/
|