Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In the FileStorage.php at line #118, whitespace is incorrectly used when concatenating variables forming a sentence.
Proposed resolution
Fix it.
Remaining tasks
Test, RTBC, commit, release.
User interface changes
See before/after comparison screenshot of CLI:
API changes
n.a.
Data model changes
n.a.
Release notes snippet
n.a.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff.3181272.9-14.txt | 1000 bytes | longwave |
#14 | 3181272-14.patch | 2.14 KB | longwave |
Comments
Comment #2
Balu ErtlComment #3
larowlanI'm guessing we don't have tests for this, so given this is a bug, we should probably add one
We already have \Drupal\KernelTests\Core\Config\Storage\FileStorageTest::testReadUnsupportedDataTypeConfigException which is covering that code path, so we could probably modify it to cover the actual message
Thanks for this
Comment #4
jungleTest added.
Comment #5
jungleLet the method name inline with the comment.
Comment #7
jungleTrying to fix the failed test.
Comment #9
jungleAnother try
Comment #11
jungleHelp needed, the expected error messages are different between local and CI.
Comment #12
longwaveThere are at least two possible YAML parsers - there is a PECL extension (which it looks like DrupalCI has enabled), and the Symfony Yaml component. They have slightly different error messages.
I think you might have to catch the exception and use assertStringContainsString on the exception message like the original test did.
Comment #13
longwaveComment #14
longwaveIn fact there is a simpler way.
Comment #15
jungle#12, make sense, thanks, @longwave!
Although not the whole error message gets asserted, it is better than the original.
Comment #19
catchCommitted/pushed to 9.2.x, and cherry-picked to 9.1.x and 8.9.x, thanks!
Comment #20
drummThe version change didn’t quite stick everywhere due to some race condition. Just updating to flush that out.
Comment #22
alexpottReverted from 8.9.x as this change broke tests there.
Comment #23
alexpottI think the problem is caused by different symfony yaml version in D8/D9.