Fix split filter for php >=8.0 in case of empty separator #126
Annotations
12 warnings
PHP 8.2
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/cache@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
PHP 8.2
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/
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L115
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
*
* @param string $token
*/
- protected function whitespaceHandler($token)
+ private function whitespaceHandler($token)
{
/*
* This assumes that TAG_START is always '{%', and a whitespace control indicator
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L121
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
* This assumes that TAG_START is always '{%', and a whitespace control indicator
* is exactly one character long, on a third position.
*/
- if (mb_substr($token, 2, 1) === Liquid::get('WHITESPACE_CONTROL')) {
+ if (substr($token, 2, 1) === Liquid::get('WHITESPACE_CONTROL')) {
$previousToken = end($this->nodelist);
if (is_string($previousToken)) {
// this can also be a tag or a variable
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L132
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
* This assumes that TAG_END is always '%}', and a whitespace control indicator
* is exactly one character long, on a third position from the end.
*/
- self::$trimWhitespace = mb_substr($token, -3, 1) === Liquid::get('WHITESPACE_CONTROL');
+ self::$trimWhitespace = substr($token, -3, 1) === Liquid::get('WHITESPACE_CONTROL');
}
/**
* Render the block.
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L160
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
{
$result = '';
foreach ($list as $token) {
- if (is_object($token) && method_exists($token, 'render')) {
+ if (is_object($token) || method_exists($token, 'render')) {
$value = $token->render($context);
} else {
$value = $token;
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L188
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
/**
* An action to execute when the end tag is reached
*/
- protected function endTag()
+ private function endTag()
{
// Do nothing by default
}
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L206
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
{
switch ($tag) {
case 'else':
- throw new ParseException($this->blockName() . " does not expect else tag");
+ throw new ParseException(" does not expect else tag" . $this->blockName());
case 'end':
throw new ParseException("'end' is not a valid delimiter for " . $this->blockName() . " tags. Use " . $this->blockDelimiter());
default:
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L206
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
{
switch ($tag) {
case 'else':
- throw new ParseException($this->blockName() . " does not expect else tag");
+ throw new ParseException(" does not expect else tag");
case 'end':
throw new ParseException("'end' is not a valid delimiter for " . $this->blockName() . " tags. Use " . $this->blockDelimiter());
default:
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L208
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
case 'else':
throw new ParseException($this->blockName() . " does not expect else tag");
case 'end':
- throw new ParseException("'end' is not a valid delimiter for " . $this->blockName() . " tags. Use " . $this->blockDelimiter());
+ throw new ParseException($this->blockName() . "'end' is not a valid delimiter for " . " tags. Use " . $this->blockDelimiter());
default:
throw new ParseException("Unknown tag {$tag}");
}
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L208
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
case 'else':
throw new ParseException($this->blockName() . " does not expect else tag");
case 'end':
- throw new ParseException("'end' is not a valid delimiter for " . $this->blockName() . " tags. Use " . $this->blockDelimiter());
+ throw new ParseException($this->blockName() . " tags. Use " . $this->blockDelimiter());
default:
throw new ParseException("Unknown tag {$tag}");
}
|
PHP 8.2:
src/Liquid/AbstractBlock.php#L208
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
case 'else':
throw new ParseException($this->blockName() . " does not expect else tag");
case 'end':
- throw new ParseException("'end' is not a valid delimiter for " . $this->blockName() . " tags. Use " . $this->blockDelimiter());
+ throw new ParseException("'end' is not a valid delimiter for " . " tags. Use " . $this->blockDelimiter());
default:
throw new ParseException("Unknown tag {$tag}");
}
|