if (empty($matches[2
])) { static::
fail('could not find product properties in product-stream-condition.service.js'
);
} $json =
sprintf('[%s]',
rtrim(trim(str_replace(['\'', \PHP_EOL
],
['"', ''
],
$matches[2
])), ','
));
$properties =
json_decode($json, true, 512, \JSON_THROW_ON_ERROR
);
if (!\
is_array($properties)) { static::
fail('could not extract product properties from product-stream-condition.service.js'
);
} $mapping =
$this->elasticDefinition->
getMapping(Context::
createDefaultContext());
$mappedProperties =
array_keys($mapping['properties'
]);
$unmappedProperties =
array_filter($properties,
function Dstring
$property) use ($mappedProperties): bool
{ $field =
$this->productDefinition->
getField($property);
if ($field instanceof AssociationField ||
$field instanceof CheapestPriceField ||
$field instanceof PriceField
) { return false;
} return !\
in_array($property,
$mappedProperties, true
);
});