- Issue created by @pdureau
- 🇫🇷France pdureau Paris
Not possible to move it to the Schema Manager's Canonicalizer, because Canonicalizer service is called (from
ComponentPluginManager::annotateProp()
toPropTypePluginManager::getDefinitionFromSchema()
toCompatibilityChecker::isCompatible()
) beforeComponentMetadata::parseSchemaInfo()
is executed (ComponentPluginManager::createInstance()
toComponent::__construct()
toComponentMetadata::__construct()
).I have tried to alter it by overriding
ComponentPluginManager::createInstance()
but everything is read-only.So, I guess we need to fix this directly in SDC with a Core issue, by simply removing:
// All props should also support "object" this allows deferring rendering // in Twig to the render pipeline. $schema_props = $metadata_info['props']; foreach ($schema_props['properties'] ?? [] as $name => $prop_schema) { $type = $prop_schema['type'] ?? ''; $schema['properties'][$name]['type'] = array_unique([ ...(array) $type, 'object', ]); }