- Issue created by @joachim
- Status changed to Needs review
10 months ago 1:33pm 26 February 2024 - Status changed to Needs work
10 months ago 2:20pm 26 February 2024 - ๐ฌ๐งUnited Kingdom joachim
Tagging as novice, because test failures should be just a case of updating the expected exception messages.
- First commit to issue fork.
- ๐ซ๐ฎFinland markusVJH
I added a commit to try to update the tests to match the new format of the expectation message, apologies if I jumped the shark on that one. I am not yet sure should be done about the test failures @joachim.
- First commit to issue fork.
- ๐ฎ๐ณIndia shalini_jha
Hi @Joachim,
Iโve reviewed the test failures caused by recent changes to ConfigSchemaChecker. It seems that while some failures relate to changes in the exception messages, others are due to how we handle cases where $key isnโt in the expected foo.bar:bar.biz format. Specifically, weโre seeing integer keys instead of the expected string format, which leads to $error_property being null. This causes the error:
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given
For example, in scenarios like:
array:4 [ 0 => "[dependencies.theme.0] Theme 'bluemarine' is not installed." 1 => "[theme] Theme 'bluemarine' is not installed." 2 => "[region] This value should not be blank." 3 => "[region] This is not a valid region of the <em class=\"placeholder\">bluemarine</em> theme." ]
Here, $key does not split as expected, leading to null in $error_property. Currently, we havenโt implemented any handling for integer keys, which leads to the failures to these test method i have checked like : testInvalidConfiguration(), testConfigSchemaChecker(), and testBlockMigration() .
Could you please advise on how to handle integer keys? One approach could be to check if the $key is an integer and set $error_property as blank in such cases, or we could use the string representation of the key, like [dependencies.theme.0], as the property. Please let me know if you have a preferred direction for managing this scenario, or if I'm overlooking any potential cases. I am moving this for review to get your input on it. Thank you!
- ๐บ๐ธUnited States smustgrave
Issue summary appears incomplete, Did not reiew