diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 83371b29..2993acd5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -330,36 +330,11 @@ parameters: count: 1 path: src/lib/FieldMapper/ContentTranslationFieldMapper/Aggregate.php - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$name\\.$#" - count: 1 - path: src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php - - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$type\\.$#" - count: 2 - path: src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php - - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$value\\.$#" - count: 2 - path: src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php - - message: "#^Property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\FieldType\\:\\:\\$boost \\(int\\) does not accept float\\.$#" count: 1 path: src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$type\\.$#" - count: 1 - path: src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php - - - - message: "#^Access to protected property Ibexa\\\\Contracts\\\\Core\\\\Search\\\\Field\\:\\:\\$value\\.$#" - count: 2 - path: src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php - - message: "#^Parameter \\#2 \\$array of function array_map expects array, iterable\\ given\\.$#" count: 1 diff --git a/src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php b/src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php index 8e8b9599..9c68d8de 100644 --- a/src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php +++ b/src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php @@ -73,7 +73,7 @@ public function mapFields(Content $content, $languageCode) } foreach ($contentType->fieldDefinitions as $fieldDefinition) { - if ($fieldDefinition->id !== $field->fieldDefinitionId) { + if ($fieldDefinition->id !== $field->fieldDefinitionId || !$fieldDefinition->isSearchable) { continue; } diff --git a/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php b/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php index e38e25cb..8eb6991e 100644 --- a/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php +++ b/src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php @@ -127,7 +127,7 @@ private function doMapFields(Content $content, ContentType $contentType, $langua } foreach ($contentType->fieldDefinitions as $fieldDefinition) { - if ($fieldDefinition->id !== $field->fieldDefinitionId) { + if ($fieldDefinition->id !== $field->fieldDefinitionId || !$fieldDefinition->isSearchable) { continue; } @@ -139,7 +139,7 @@ private function doMapFields(Content $content, ContentType $contentType, $langua continue; } - if (!$indexField->type instanceof FieldType\FullTextField || !$fieldDefinition->isSearchable) { + if (!$indexField->type instanceof FieldType\FullTextField) { continue; }