diff --git a/ignore-gte-php8.0-errors.neon b/ignore-gte-php8.0-errors.neon index 1dc487bf..8df87fcf 100644 --- a/ignore-gte-php8.0-errors.neon +++ b/ignore-gte-php8.0-errors.neon @@ -1,11 +1,12 @@ parameters: ignoreErrors: - - - message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|null given\\.$#" - count: 2 - path: src/lib/RichText/Converter/Render/Embed.php - - message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#" count: 1 path: src/lib/RichText/Converter/Render/Template.php + + - + message: '#^Parameter \#2 \$child of method DOMNode\:\:replaceChild\(\) expects DOMNode, DOMNameSpaceNode\|DOMNode given\.$#' + identifier: argument.type + count: 1 + path: src/lib/RichText/XMLSanitizer.php diff --git a/ignore-gte-php8.1-errors.neon b/ignore-gte-php8.1-errors.neon index a40637e1..6ab748d3 100644 --- a/ignore-gte-php8.1-errors.neon +++ b/ignore-gte-php8.1-errors.neon @@ -6,12 +6,6 @@ parameters: count: 1 path: src/lib/RichText/TextExtractor/FullTextExtractor.php - - - message: '#^Parameter \#2 \$child of method DOMNode\:\:replaceChild\(\) expects TNode of DOMNode, DOMNameSpaceNode\|DOMNode given\.$#' - identifier: argument.type - count: 1 - path: src/lib/RichText/XMLSanitizer.php - - message: '#^Cannot call method removeChild\(\) on DOMNode\|null\.$#' identifier: method.nonObject diff --git a/ignore-lte-php7.4-errors.neon b/ignore-lte-php7.4-errors.neon index ff1b5465..b2da69ff 100644 --- a/ignore-lte-php7.4-errors.neon +++ b/ignore-lte-php7.4-errors.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false\\|null given\\.$#" + message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#" count: 2 path: src/lib/RichText/Converter/Render/Embed.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 82603f6d..6b73fbca 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -552,6 +552,42 @@ parameters: count: 1 path: src/lib/FieldType/RichText/RichTextStorage.php + - + message: '#^Offset 1 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\?\: string, 2\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/FieldType/RichText/RichTextStorage.php + + - + message: '#^Offset 1 might not exist on array\{\}\|list\{0\: string, 1\?\: ''''\|''ezremote\://'', 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/FieldType/RichText/RichTextStorage.php + + - + message: '#^Offset 2 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\?\: string, 2\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/FieldType/RichText/RichTextStorage.php + + - + message: '#^Offset 2 might not exist on array\{\}\|list\{0\: string, 1\?\: ''''\|''ezremote\://'', 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 2 + path: src/lib/FieldType/RichText/RichTextStorage.php + + - + message: '#^Offset 2 might not exist on list\{0\: string, 1\: ''ezremote\://'', 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/FieldType/RichText/RichTextStorage.php + + - + message: '#^Offset 3 might not exist on array\{\}\|list\{0\: string, 1\?\: ''''\|''ezremote\://'', 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/FieldType/RichText/RichTextStorage.php + - message: '#^Parameter \#1 \$source of method DOMDocument\:\:loadXML\(\) expects string, array\|bool\|float\|int\|string\|null given\.$#' identifier: argument.type @@ -756,6 +792,24 @@ parameters: count: 1 path: src/lib/RichText/Converter/Link.php + - + message: '#^Offset 1 might not exist on array\{\}\|list\{0\: string, 1\?\: string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Converter/Link.php + + - + message: '#^Offset 2 might not exist on array\{\}\|list\{0\: string, 1\?\: string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Converter/Link.php + + - + message: '#^Offset 3 might not exist on array\{\}\|list\{0\: string, 1\?\: string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Converter/Link.php + - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' identifier: argument.type @@ -936,6 +990,12 @@ parameters: count: 1 path: src/lib/RichText/Converter/Render/Embed.php + - + message: '#^Offset 1 might not exist on array\{\}\|array\{non\-falsy\-string, ''ezcontent''\|''ezlocation'', numeric\-string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Converter/Render/Embed.php + - message: '#^PHPDoc tag @var has invalid value \(\$embed \\DOMElement\)\: Unexpected token "\$embed", expected type at offset 9 on line 1$#' identifier: phpDoc.parseError @@ -1146,6 +1206,18 @@ parameters: count: 1 path: src/lib/RichText/RelationProcessor.php + - + message: '#^Offset 1 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/RelationProcessor.php + + - + message: '#^Offset 2 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/RelationProcessor.php + - message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' identifier: method.nonObject @@ -1278,6 +1350,18 @@ parameters: count: 1 path: src/lib/RichText/Validator/InternalLinkValidator.php + - + message: '#^Offset 1 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Validator/InternalLinkValidator.php + + - + message: '#^Offset 2 might not exist on array\{\}\|list\{0\: non\-falsy\-string, 1\: non\-empty\-string, 2\?\: string, 3\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/RichText/Validator/InternalLinkValidator.php + - message: '#^PHPDoc tag @var has invalid value \(\\Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler;\)\: Unexpected token ";", expected TOKEN_HORIZONTAL_WS at offset 74 on line 2$#' identifier: phpDoc.parseError diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js index 7b4fc928..5833270f 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js @@ -86,7 +86,7 @@ class IbexaCustomTagFormView extends View { } setBooleanValue(attributeView, value) { - attributeView.fieldView.isOn = !!value || value === 'true'; + attributeView.fieldView.isOn = value === 'true'; attributeView.fieldView.element.value = value; attributeView.fieldView.set('value', value); attributeView.fieldView.set('isEmpty', false);