Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Less strict return types on resolving values #3760

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/IndexQueue/AbstractIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function resolveFieldValue(
string $solrFieldName,
array $data,
TypoScriptFrontendController $tsfe
): array|float|int|string|null {
): mixed {
if (isset($indexingConfiguration[$solrFieldName . '.'])) {
// configuration found => need to resolve a cObj

Expand Down Expand Up @@ -276,7 +276,7 @@ protected static function isSerializedResultFromRegisteredHook(array $indexingCo
* @param string $fieldType The dynamic field's type
* @return int|float|string|null Returns the value in the correct format for the field type
*/
protected function ensureFieldValueType(mixed $value, string $fieldType): int|float|string|null
protected function ensureFieldValueType(mixed $value, string $fieldType): mixed
{
switch ($fieldType) {
case 'int':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function getMappedFields(Document $pageDocument, array $pageRecord): a
* @param string $solrFieldName The Solr field name to resolve the value from the item's record
* @return string|array The resolved value to be indexed
*/
protected function resolveFieldValue(string $solrFieldName, Document $pageDocument, array $pageRecord): array|string
protected function resolveFieldValue(string $solrFieldName, Document $pageDocument, array $pageRecord): mixed
{
$pageIndexingConfiguration = $this->configuration->getIndexQueueFieldsConfigurationByConfigurationName($this->pageIndexingConfigurationName);

Expand Down