Problem/Motivation
#3360991: TypedData instances created by TypedConfigManager::createFromNameAndData() are incomplete made a critical change in \Drupal\Core\Config\TypedConfigManager::createFromNameAndData(), which requires \Drupal\config_inspector\Controller\ConfigInspectorController::formatTree() to be modified, and possibly other code.
Steps to reproduce
Visit /admin/reports/config-inspector/field.field.block_content.basic.body/tree. It crashes:
TypeError: Drupal\config_inspector\ConfigSchemaValidatability::getConstraints(): Return value must be of type array, null returned in Drupal\config_inspector\ConfigSchemaValidatability->getConstraints() (line 63 of modules/contrib/config_inspector/src/ConfigSchemaValidatability.php).
Also visible in CI tests: https://www.drupal.org/pift-ci-job/2686221
Proposed resolution
Detect >=10.1.x and use different logic then.
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
wim leersComment #3
wim leersSimilar thing in
::formatList()👍Comment #4
wim leersNow green on
10.1.x, while still green on9.5.xand10.0.x! 🚢Comment #6
wim leersComment #7
wim leersSimilar problems exist in the Drush commands, but they do not have test coverage.
Comment #8
wim leersComment #9
wim leers#8 still has a bug:
The first line after the top-level key is wrong:
field.field.block_content.basic.body:field.field.block_content.basic.bodydoes not make sense.Comment #10
wim leersFixes #9:
👍
Still need to manually test on
9.5.xand10.0.x.Comment #11
wim leersTested on
10.0.x, works fine 👍Comment #13
wim leersComment #17
wim leersMarked #3378865: getConstraints() is typed array but may return null as a duplicate. Crediting all who contributed there!