- Issue created by @Wim Leers
- Assigned to tedbow
- Issue was unassigned.
- Status changed to Needs review
7 days ago 5:22pm 21 June 2024 - Assigned to tedbow
- Status changed to Needs work
1 day ago 3:37pm 27 June 2024
This logic:
// Validate that each prop source resolves into a value that is considered
// valid by the destination SDC prop.
// @todo Move to validation constraint.
foreach ($component_instance_uuids as $component_instance_uuid) {
$component_id = $tree->getComponentId($component_instance_uuid);
$props_values = $this->resolveComponentProps($component_instance_uuid);
try {
$component = $this->getComponentPluginManager()->find($component_id);
$this->getComponentValidator()->validateProps($props_values, $component);
}
catch (ComponentNotFoundException $e) {
throw new \LogicException(sprintf('The component instance with UUID %s uses component %s but does not exist! Put a breakpoint here and figure out why.', $component_instance_uuid, $component_id));
}
catch (InvalidComponentException $e) {
throw new \LogicException(sprintf('The component instance with UUID %s uses component %s and receives some invalid props! Put a breakpoint here and figure out why.', $component_instance_uuid, $component_id));
}
}
… belongs in a validation constraint.
It'll:
Do the above.
If ✨ Allow specifying default props values when opting an SDC in for XB Needs work lands before this, its config schema should be updated to use this new validation constraint too.
Needs work
Code