Remove PHP 7.4 and PHP 8.0 support #184
build.yaml
on: pull_request
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation tests
Matrix: Static Code Analysis
Matrix: Unit tests
Annotations
26 errors and 10 warnings
Coding Standards (8.1, highest)
Process completed with exit code 1.
|
UnusedVariable:
src/TagBag.php#L262
src/TagBag.php:262:9: UnusedVariable: $serializationException is never referenced or the value is not used (see https://psalm.dev/077)
|
MixedArgument:
src/TagBag.php#L265
src/TagBag.php:265:47: MixedArgument: Argument 1 of set_error_handler cannot be mixed, expecting callable(int, string, string=, int=, array<array-key, mixed>=):bool|null (see https://psalm.dev/030)
|
UndefinedVariable:
src/TagBag.php#L265
src/TagBag.php:265:112: UndefinedVariable: Cannot find referenced variable $prevErrorHandler (see https://psalm.dev/024)
|
ArgumentTypeCoercion:
tests/TagBagTest.php#L362
tests/TagBagTest.php:362:28: ArgumentTypeCoercion: Argument 1 of preg_match expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
Static Code Analysis (8.1, highest)
Process completed with exit code 2.
|
Static Code Analysis (8.1, lowest)
The job was canceled because "_8_1_highest" failed.
|
UnusedVariable:
src/TagBag.php#L262
src/TagBag.php:262:9: UnusedVariable: $serializationException is never referenced or the value is not used (see https://psalm.dev/077)
|
MixedArgument:
src/TagBag.php#L265
src/TagBag.php:265:47: MixedArgument: Argument 1 of set_error_handler cannot be mixed, expecting callable(int, string, string=, int=, array<array-key, mixed>=):bool|null (see https://psalm.dev/030)
|
UndefinedVariable:
src/TagBag.php#L265
src/TagBag.php:265:112: UndefinedVariable: Cannot find referenced variable $prevErrorHandler (see https://psalm.dev/024)
|
ArgumentTypeCoercion:
tests/TagBagTest.php#L362
tests/TagBagTest.php:362:28: ArgumentTypeCoercion: Argument 1 of preg_match expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
Static Code Analysis (8.1, lowest)
Process completed with exit code 2.
|
Static Code Analysis (8.3, highest)
The job was canceled because "_8_1_highest" failed.
|
UnusedVariable:
src/TagBag.php#L262
src/TagBag.php:262:9: UnusedVariable: $serializationException is never referenced or the value is not used (see https://psalm.dev/077)
|
MixedArgument:
src/TagBag.php#L265
src/TagBag.php:265:47: MixedArgument: Argument 1 of set_error_handler cannot be mixed, expecting callable(int, string, string=, int=, array<array-key, mixed>=):bool|null (see https://psalm.dev/030)
|
UndefinedVariable:
src/TagBag.php#L265
src/TagBag.php:265:112: UndefinedVariable: Cannot find referenced variable $prevErrorHandler (see https://psalm.dev/024)
|
ArgumentTypeCoercion:
tests/TagBagTest.php#L362
tests/TagBagTest.php:362:28: ArgumentTypeCoercion: Argument 1 of preg_match expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
Static Code Analysis (8.3, highest)
The operation was canceled.
|
Static Code Analysis (8.2, highest)
The job was canceled because "_8_1_highest" failed.
|
Static Code Analysis (8.2, lowest)
The job was canceled because "_8_1_highest" failed.
|
Static Code Analysis (8.3, lowest)
The job was canceled because "_8_1_highest" failed.
|
UnusedVariable:
src/TagBag.php#L262
src/TagBag.php:262:9: UnusedVariable: $serializationException is never referenced or the value is not used (see https://psalm.dev/077)
|
MixedArgument:
src/TagBag.php#L265
src/TagBag.php:265:47: MixedArgument: Argument 1 of set_error_handler cannot be mixed, expecting callable(int, string, string=, int=, array<array-key, mixed>=):bool|null (see https://psalm.dev/030)
|
UndefinedVariable:
src/TagBag.php#L265
src/TagBag.php:265:112: UndefinedVariable: Cannot find referenced variable $prevErrorHandler (see https://psalm.dev/024)
|
ArgumentTypeCoercion:
tests/TagBagTest.php#L362
tests/TagBagTest.php:362:28: ArgumentTypeCoercion: Argument 1 of preg_match expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
Static Code Analysis (8.3, lowest)
Process completed with exit code 2.
|
Mutation tests (8.3, highest):
src/Generator/ValueBasedFingerprintGenerator.php#L16
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
private string $hashAlgorithm;
public function __construct(string $hashAlgorithm = 'md5')
{
- Assert::oneOf($hashAlgorithm, hash_algos());
+
$this->hashAlgorithm = $hashAlgorithm;
}
public function generate(TagInterface $tag, string $renderedValue) : string
|
Mutation tests (8.3, highest):
src/Renderer/AttributesAwareRendererTrait.php#L11
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
use Setono\TagBag\Tag\AttributesAwareInterface;
trait AttributesAwareRendererTrait
{
- public function renderAttributes(AttributesAwareInterface $tag) : string
+ protected function renderAttributes(AttributesAwareInterface $tag) : string
{
$attributes = '';
foreach ($tag->getAttributes() as $attribute => $value) {
|
Mutation tests (8.3, highest):
src/Renderer/ContentAwareRenderer.php#L23
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
public function render(TagInterface $tag) : string
{
- Assert::true($this->supports($tag));
+
return $tag->getContent();
}
}
|
Mutation tests (8.3, highest):
src/Renderer/ElementRenderer.php#L28
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public function render(TagInterface $tag) : string
{
- Assert::true($this->supports($tag));
+
if ($tag->hasClosingElement()) {
return sprintf('<%s%s>%s</%s>', $tag->getElement(), $this->renderAttributes($tag), $tag->getContent(), $tag->getElement());
}
|
Mutation tests (8.3, highest):
src/Tag/AttributesAwareTrait.php#L14
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
/** @var array<string, string|null> */
protected array $attributes = [];
- public function hasAttribute(string $attribute) : bool
+ protected function hasAttribute(string $attribute) : bool
{
return array_key_exists($attribute, $this->attributes);
}
|
Mutation tests (8.3, highest):
src/Tag/AttributesAwareTrait.php#L41
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
*
* @return static
*/
- public function withAttribute(string $attribute, $val = null) : self
+ protected function withAttribute(string $attribute, $val = null) : self
{
$obj = clone $this;
$obj->attributes[$attribute] = null === $val ? null : (string) $val;
|
Mutation tests (8.3, highest):
src/Tag/AttributesAwareTrait.php#L44
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
public function withAttribute(string $attribute, $val = null) : self
{
$obj = clone $this;
- $obj->attributes[$attribute] = null === $val ? null : (string) $val;
+ $obj->attributes[$attribute] = null === $val ? null : $val;
return $obj;
}
}
|
Mutation tests (8.3, highest):
src/Tag/ElementTag.php#L38
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
/**
* @return static
*/
- public static function createWithoutContent(string $element, bool $hasClosingElement = true) : self
+ public static function createWithoutContent(string $element, bool $hasClosingElement = false) : self
{
return new static($element, '', $hasClosingElement);
}
|
Mutation tests (8.3, highest):
src/Tag/ElementTag.php#L64
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
/**
* @return static
*/
- public function withClosingElement(bool $closingElement) : self
+ protected function withClosingElement(bool $closingElement) : self
{
return $this->with('closingElement', $closingElement);
}
|
Mutation tests (8.3, highest):
src/Tag/LinkTag.php#L14
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*/
public static function create(string $rel = null, string $href = null) : self
{
- $tag = parent::createWithoutContent('link', false);
+ $tag = parent::createWithoutContent('link', true);
if (null !== $rel) {
$tag = $tag->withRel($rel);
}
|