Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
configuration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Sep 2018 at 15:55 UTC
Updated:
9 Nov 2018 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottI debated whether the fix should go in \Drupal\Core\Config\FileStorage::getAllCollectionNamesHelper() but I'm thinking not.
Comment #4
bircherI tested the patch with the Config Split tests and I realized that I don't have test coverage for different collections there.
The reason I mention it is because I am not sure how it fares with
\org\bovigo\vfs\vfsStreamWrapperin tests.But since here we use a real file system anyway it is ok.
Another alternative would have been to catch the exception in
\Drupal\Core\Config\FileStorage::getAllCollectionNamesHelper()but the patch here is also a good solution.I like that it is a straight forward fix which makes it consistent, so RTBC.
Comment #5
alexpott@bircher it should fare just fine - in KernelTestBase land the public file directory that this test uses is virtual :)
Comment #6
larowlanShould we be providing some sort of feedback/logging that the directory is broken.
Silently gulping the error might end up with someone sinking a heap of time for no reason
Comment #7
alexpottI think it's absolutely fine for this to be called in the situation before the config directory exists. See the testing around \Drupal\KernelTests\Core\Config\Storage\ConfigStorageTestBase::$invalidStorage - we do automatic directory creation on write.
If this directory does not exist then there are no collections.
Comment #10
larowlanCommitted de15d04 and pushed to 8.7.x. Thanks!
c/p as e09b77c346 and pushed to 8.6.x